From 3e87142caf4b143d59ebae348ace706917b7eb51 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Sun, 26 Aug 2007 21:49:58 +0000 Subject: Add saved files to the GtkRecent list, gnome-panel is broken so don't 2007-08-26 Diego Escalante Urrelo * 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 --- lib/ephy-file-helpers.c | 12 ++++++++++++ lib/ephy-file-helpers.h | 3 +++ 2 files changed, 15 insertions(+) (limited to 'lib') 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 #include #include +#include #include #include @@ -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) { diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h index 75a0ac088..f7aa71281 100644 --- a/lib/ephy-file-helpers.h +++ b/lib/ephy-file-helpers.h @@ -77,6 +77,9 @@ gboolean ephy_file_switch_temp_file (const char *filename, void ephy_file_delete_on_exit (const char *path); +void ephy_file_add_recent_item (const char *uri, + const char *mime_type); + EphyMimePermission ephy_file_check_mime (const char *mime_type); gboolean ephy_file_launch_desktop_file (const char *filename, -- cgit v1.2.3