diff options
author | Diego Escalante Urrelo <diegoe@gnome.org> | 2007-08-27 05:49:58 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2007-08-27 05:49:58 +0800 |
commit | 3e87142caf4b143d59ebae348ace706917b7eb51 (patch) | |
tree | 228beeb412ba4b5034c45f3447c33ae241bc8dcc /lib | |
parent | 53075e8f45b40da4260a9d46ce2b41668381dacb (diff) | |
download | gsoc2013-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')
-rw-r--r-- | lib/ephy-file-helpers.c | 12 | ||||
-rw-r--r-- | lib/ephy-file-helpers.h | 3 |
2 files changed, 15 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) { 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, |