]>
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
6 // Copyright: (c) 2010 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // ============================================================================
12 // ============================================================================
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 // For compilers that support precompilation, includes "wx.h".
19 #include "wx/wxprec.h"
25 #include "wx/filehistory.h"
27 #if wxUSE_FILE_HISTORY
29 #include "wx/filename.h"
33 #include "wx/gtk/private/string.h"
34 #include "wx/gtk/private.h"
36 // ============================================================================
38 // ============================================================================
40 void wxFileHistory::AddFileToHistory(const wxString
& file
)
42 wxFileHistoryBase::AddFileToHistory(file
);
45 const wxString fullPath
= wxFileName(file
).GetFullPath();
47 if ( !gtk_check_version(2,10,0) )
50 wxGtkString
uri(g_filename_to_uri(wxGTK_CONV_FN(fullPath
), NULL
, NULL
));
53 gtk_recent_manager_add_item(gtk_recent_manager_get_default(), uri
);
58 #endif // wxUSE_FILE_HISTORY