[gedit/wip/misc-improvements] Make gedit_recent_add_document() reusable



commit ce6515c991286067ba95686599589431d58a68b7
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 26 14:36:21 2015 +0200

    Make gedit_recent_add_document() reusable
    
    Reusable for other apps.

 gedit/gedit-recent.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-recent.c b/gedit/gedit-recent.c
index 28ee5db..e262707 100644
--- a/gedit/gedit-recent.c
+++ b/gedit/gedit-recent.c
@@ -36,7 +36,7 @@ gedit_recent_add_document (GeditDocument *document)
        GtkRecentManager *recent_manager;
        GtkRecentData recent_data;
        gchar *uri;
-       static gchar *groups[2] = { "gedit", NULL };
+       static gchar *groups[2];
 
        g_return_if_fail (GEDIT_IS_DOCUMENT (document));
 
@@ -50,6 +50,9 @@ gedit_recent_add_document (GeditDocument *document)
 
        recent_manager = gtk_recent_manager_get_default ();
 
+       groups[0] = (gchar *) g_get_application_name ();
+       groups[1] = NULL;
+
        recent_data.display_name = NULL;
        recent_data.description = NULL;
        recent_data.mime_type = gedit_document_get_mime_type (document);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]