aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-file-helpers.c12
-rw-r--r--lib/ephy-file-helpers.h3
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,