summaryrefslogtreecommitdiffstats
path: root/launcher-desktop-files.patch
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@fedoraproject.org>2007-09-13 17:42:24 +0000
committerMatthias Clasen <mclasen@fedoraproject.org>2007-09-13 17:42:24 +0000
commit1c078e51cda493012b4d2f3377e6dc7645007d98 (patch)
treebbfeaee9c1f2a43af7f28fa9fbfbb2abdc1c73a4 /launcher-desktop-files.patch
parent2881c7812848bc866ce29bca16737125d654874e (diff)
downloadgnome-panel-1c078e51cda493012b4d2f3377e6dc7645007d98.tar.gz
gnome-panel-1c078e51cda493012b4d2f3377e6dc7645007d98.tar.xz
gnome-panel-1c078e51cda493012b4d2f3377e6dc7645007d98.zip
fix a mem leak update default configurationgnome-panel-2_19_92-4_fc8
Diffstat (limited to 'launcher-desktop-files.patch')
-rw-r--r--launcher-desktop-files.patch31
1 files changed, 20 insertions, 11 deletions
diff --git a/launcher-desktop-files.patch b/launcher-desktop-files.patch
index 4d1d92a..f42379d 100644
--- a/launcher-desktop-files.patch
+++ b/launcher-desktop-files.patch
@@ -1,7 +1,7 @@
-diff -up gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c.launcher-desktop-file gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c
---- gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c.launcher-desktop-file 2007-08-28 00:20:51.000000000 -0400
-+++ gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c 2007-08-28 00:20:57.000000000 -0400
-@@ -973,6 +973,42 @@ panel_ditem_editor_icon_changed (PanelDI
+diff -up gnome-panel-2.19.92/gnome-panel/panel-ditem-editor.c.launcher-desktop-files gnome-panel-2.19.92/gnome-panel/panel-ditem-editor.c
+--- gnome-panel-2.19.92/gnome-panel/panel-ditem-editor.c.launcher-desktop-files 2007-09-04 13:34:26.000000000 -0400
++++ gnome-panel-2.19.92/gnome-panel/panel-ditem-editor.c 2007-09-13 12:13:36.000000000 -0400
+@@ -973,6 +973,51 @@ panel_ditem_editor_icon_changed (PanelDI
g_free (file);
}
@@ -14,6 +14,7 @@ diff -up gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c.launcher-desktop-fi
+ char *comment;
+ char *exec;
+ char *icon;
++ gboolean retval = FALSE;
+
+ key_file = g_key_file_new ();
+ if (g_key_file_load_from_file (key_file, uri, 0, NULL)) {
@@ -27,24 +28,32 @@ diff -up gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c.launcher-desktop-fi
+ icon = panel_util_key_file_get_locale_string (key_file, "Icon");
+ exec = panel_util_key_file_get_string (key_file, "Exec");
+
-+ gtk_entry_set_text (GTK_ENTRY (dialog->priv->name_entry), name ? name : "");
-+ gtk_entry_set_text (GTK_ENTRY (dialog->priv->comment_entry), comment ? comment : "");
-+ gtk_entry_set_text (GTK_ENTRY (dialog->priv->command_entry), exec ? exec : "");
++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->name_entry), name ? name : "");
++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->comment_entry), comment ? comment : "");
++ gtk_entry_set_text (GTK_ENTRY (dialog->priv->command_entry), exec ? exec : "");
++
+ /* Note: we need to set the icon last, since the editor
+ * tries to guess the icon when the command is modified
+ */
+ setup_icon_entry (dialog, icon);
+
-+ return TRUE;
++ g_free (name);
++ g_free (comment);
++ g_free (icon);
++ g_free (exec);
++
++ retval = TRUE;
+ }
+
-+ return FALSE;
++ g_key_file_free (key_file);
++
++ return retval;
+}
+
static void
command_browse_chooser_response (GtkFileChooser *chooser,
gint response_id,
-@@ -986,7 +1022,11 @@ command_browse_chooser_response (GtkFile
+@@ -986,7 +1031,11 @@ command_browse_chooser_response (GtkFile
case PANEL_DITEM_EDITOR_TYPE_APPLICATION:
case PANEL_DITEM_EDITOR_TYPE_TERMINAL_APPLICATION:
text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
@@ -57,7 +66,7 @@ diff -up gnome-panel-2.19.6/gnome-panel/panel-ditem-editor.c.launcher-desktop-fi
g_free (text);
break;
case PANEL_DITEM_EDITOR_TYPE_LINK:
-@@ -996,8 +1036,9 @@ command_browse_chooser_response (GtkFile
+@@ -996,8 +1045,9 @@ command_browse_chooser_response (GtkFile
g_assert_not_reached ();
}