]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/filehistory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/filehistory.cpp
3 // Purpose: GTK+ bits for wxFileHistory class
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2010 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
26 #include "wx/filehistory.h"
28 #if wxUSE_FILE_HISTORY
30 #include "wx/filename.h"
34 #include "wx/gtk/private/string.h"
36 // ============================================================================
38 // ============================================================================
40 void wxFileHistory::AddFileToHistory(const wxString
& file
)
42 wxFileHistoryBase::AddFileToHistory(file
);
45 const wxString fullPath
= wxFileName(file
).GetFullPath();
46 if ( !gtk_check_version(2,10,0) )
48 wxGtkString
uri(g_filename_to_uri(fullPath
.fn_str(), NULL
, NULL
));
51 gtk_recent_manager_add_item(gtk_recent_manager_get_default(), uri
);
56 #endif // wxUSE_FILE_HISTORY