]> git.saurik.com Git - wxWidgets.git/blame - src/gtk/filehistory.cpp
Go back to using a fixed value of 3 for lines/columns per action for mouse wheel...
[wxWidgets.git] / src / gtk / filehistory.cpp
CommitLineData
690ddfec
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/gtk/filehistory.cpp
3// Purpose: GTK+ bits for wxFileHistory class
4// Author: Vaclav Slavik
5// Created: 2010-05-06
690ddfec
VS
6// Copyright: (c) 2010 Vaclav Slavik
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10// ============================================================================
11// declarations
12// ============================================================================
13
14// ----------------------------------------------------------------------------
15// headers
16// ----------------------------------------------------------------------------
17
18// For compilers that support precompilation, includes "wx.h".
19#include "wx/wxprec.h"
20
21#ifdef __BORLANDC__
22 #pragma hdrstop
23#endif
24
25#include "wx/filehistory.h"
26
27#if wxUSE_FILE_HISTORY
28
29#include "wx/filename.h"
30
31#include <glib.h>
32#include <gtk/gtk.h>
33#include "wx/gtk/private/string.h"
c282e47d 34#include "wx/gtk/private.h"
690ddfec
VS
35
36// ============================================================================
37// implementation
38// ============================================================================
39
40void wxFileHistory::AddFileToHistory(const wxString& file)
41{
42 wxFileHistoryBase::AddFileToHistory(file);
43
44#ifdef __WXGTK210__
45 const wxString fullPath = wxFileName(file).GetFullPath();
9dc44eff 46#ifndef __WXGTK3__
690ddfec 47 if ( !gtk_check_version(2,10,0) )
9dc44eff 48#endif
690ddfec 49 {
c282e47d 50 wxGtkString uri(g_filename_to_uri(wxGTK_CONV_FN(fullPath), NULL, NULL));
690ddfec
VS
51
52 if ( uri )
53 gtk_recent_manager_add_item(gtk_recent_manager_get_default(), uri);
54 }
55#endif
56}
57
58#endif // wxUSE_FILE_HISTORY