]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/filehistory.cpp
3d564b92a28bb867238d637f620df1d0d1b8eaec
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"
35 #include "wx/gtk/private.h"
37 // ============================================================================
39 // ============================================================================
41 void wxFileHistory::AddFileToHistory(const wxString
& file
)
43 wxFileHistoryBase::AddFileToHistory(file
);
46 const wxString fullPath
= wxFileName(file
).GetFullPath();
48 if ( !gtk_check_version(2,10,0) )
51 wxGtkString
uri(g_filename_to_uri(wxGTK_CONV_FN(fullPath
), NULL
, NULL
));
54 gtk_recent_manager_add_item(gtk_recent_manager_get_default(), uri
);
59 #endif // wxUSE_FILE_HISTORY