aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-file-helpers.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@gnome.org>2007-08-27 05:49:58 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-08-27 05:49:58 +0800
commit3e87142caf4b143d59ebae348ace706917b7eb51 (patch)
tree228beeb412ba4b5034c45f3447c33ae241bc8dcc /lib/ephy-file-helpers.c
parent53075e8f45b40da4260a9d46ce2b41668381dacb (diff)
downloadgsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.tar
gsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.tar.gz
gsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.tar.bz2
gsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.tar.lz
gsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.tar.xz
gsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.tar.zst
gsoc2013-epiphany-3e87142caf4b143d59ebae348ace706917b7eb51.zip
Add saved files to the GtkRecent list, gnome-panel is broken so don't
2007-08-26 Diego Escalante Urrelo <diegoe@gnome.org> * lib/ephy-file-helpers.c: * lib/ephy-file-helpers.h: * embed/mozilla/MozDownload.h: * embed/mozilla/MozDownload.cpp: Add saved files to the GtkRecent list, gnome-panel is broken so don't expect to see the effects of this working there, you can use it on the GtkFileChooser dialog however. Fixes Bug #148401. Original patch by Christian Persch, updated by Cosimo Cecchi. svn path=/trunk/; revision=7300
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r--lib/ephy-file-helpers.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index fb00f5d34..283715c59 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -46,6 +46,7 @@
#include <libsn/sn.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
+#include <gtk/gtkrecentmanager.h>
#include <string.h>
#include <stdlib.h>
@@ -488,6 +489,17 @@ ephy_file_delete_on_exit (const char *path)
/* does nothing now */
}
+void
+ephy_file_add_recent_item (const char *uri,
+ const char *mime_type)
+{
+ GtkRecentManager *manager = gtk_recent_manager_get_default ();
+
+ g_return_if_fail (mime_type != NULL && uri != NULL);
+
+ gtk_recent_manager_add_item (manager, uri);
+}
+
static void
load_mime_from_xml (void)
{