[Goodies-commits] r6461 - in xfce4-clipman-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Thu Jan 15 08:55:19 CET 2009
Author: mmassonnet
Date: 2009-01-15 07:55:19 +0000 (Thu, 15 Jan 2009)
New Revision: 6461
Modified:
xfce4-clipman-plugin/trunk/ChangeLog
xfce4-clipman-plugin/trunk/panel-plugin/clipman-dialogs.c
xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
xfce4-clipman-plugin/trunk/panel-plugin/clipman.h
Log:
- Fix a leak by freeing the ClipmanAction structs
- Don't show the tabs in the settings dialog and use the gtk-paste icon
Modified: xfce4-clipman-plugin/trunk/ChangeLog
===================================================================
--- xfce4-clipman-plugin/trunk/ChangeLog 2009-01-14 19:45:58 UTC (rev 6460)
+++ xfce4-clipman-plugin/trunk/ChangeLog 2009-01-15 07:55:19 UTC (rev 6461)
@@ -1,3 +1,8 @@
+2008-01-15 Mike Massonnet <mmassonnet at xfce.org>
+
+ - Fix a leak by freeing the ClipmanAction structs
+ - Don't show the tabs in the settings dialog and use the gtk-paste icon
+
2008-01-13 Mike Massonnet <mmassonnet at xfce.org>
- Lookup the GdkWindow of the owner to notice if the clipboard was set
Modified: xfce4-clipman-plugin/trunk/panel-plugin/clipman-dialogs.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/clipman-dialogs.c 2009-01-14 19:45:58 UTC (rev 6460)
+++ xfce4-clipman-plugin/trunk/panel-plugin/clipman-dialogs.c 2009-01-15 07:55:19 UTC (rev 6461)
@@ -143,13 +143,14 @@
NULL);
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
- gtk_window_set_icon_name (GTK_WINDOW (dialog), "xfce4-settings");
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "gtk-paste");
g_object_set_data (G_OBJECT (clipman->plugin), "dialog", dialog);
dialog_vbox = GTK_DIALOG (dialog)->vbox;
notebook = gtk_notebook_new ();
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
gtk_box_pack_start (GTK_BOX (dialog_vbox), notebook, FALSE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (notebook), BORDER-3);
Modified: xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/clipman.c 2009-01-14 19:45:58 UTC (rev 6460)
+++ xfce4-clipman-plugin/trunk/panel-plugin/clipman.c 2009-01-15 07:55:19 UTC (rev 6461)
@@ -81,10 +81,18 @@
clipman_destroy_menu (GtkWidget *menu,
ClipmanPlugin *clipman)
{
+ GSList *l;
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (clipman->button), FALSE);
gtk_widget_destroy (menu);
+ /* Clear ClipmanAction structs */
+ for (l = clipman->actions; l != NULL; l = l->next)
+ panel_slice_free (ClipmanAction, l->data);
+ g_slist_free (clipman->actions);
+ clipman->actions = NULL;
+
DBG ("Menu Destroyed");
}
@@ -352,9 +360,6 @@
}
}
- // Menu disappears ..
- panel_slice_free (ClipmanAction, action);
-
return FALSE;
}
@@ -436,8 +441,7 @@
mi = clipman_create_imagemenuitem (action);
}
- /* TODO action ends in a leak as it gets never freed in the items that
- * are not clicked */
+ clipman->actions = g_slist_prepend (clipman->actions, action);
g_signal_connect (G_OBJECT(mi), "button_release_event",
G_CALLBACK(clipman_item_clicked), action);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
Modified: xfce4-clipman-plugin/trunk/panel-plugin/clipman.h
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/clipman.h 2009-01-14 19:45:58 UTC (rev 6460)
+++ xfce4-clipman-plugin/trunk/panel-plugin/clipman.h 2009-01-15 07:55:19 UTC (rev 6461)
@@ -86,6 +86,7 @@
GPtrArray *clips;
gint DefaultIndex;
gint PrimaryIndex;
+ GSList *actions;
gboolean ItemNumbers;
More information about the Goodies-commits
mailing list