summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pluma/pluma-window.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index 8e107f92..e56fd84f 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -1138,7 +1138,7 @@ _pluma_recent_add (PlumaWindow *window,
const gchar *mime)
{
GtkRecentManager *recent_manager;
- GtkRecentData *recent_data;
+ GtkRecentData recent_data;
static gchar *groups[2] = {
"pluma",
@@ -1147,23 +1147,19 @@ _pluma_recent_add (PlumaWindow *window,
recent_manager = gtk_recent_manager_get_default ();
- recent_data = g_slice_new (GtkRecentData);
-
- recent_data->display_name = NULL;
- recent_data->description = NULL;
- recent_data->mime_type = (gchar *) mime;
- recent_data->app_name = (gchar *) g_get_application_name ();
- recent_data->app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
- recent_data->groups = groups;
- recent_data->is_private = FALSE;
+ recent_data.display_name = NULL;
+ recent_data.description = NULL;
+ recent_data.mime_type = (gchar *) mime;
+ recent_data.app_name = (gchar *) g_get_application_name ();
+ recent_data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
+ recent_data.groups = groups;
+ recent_data.is_private = FALSE;
gtk_recent_manager_add_full (recent_manager,
uri,
- recent_data);
-
- g_free (recent_data->app_exec);
+ &recent_data);
- g_slice_free (GtkRecentData, recent_data);
+ g_free (recent_data.app_exec);
}
void