[uim-commit] r3081 - trunk/helper

ekato at freedesktop.org ekato at freedesktop.org
Thu Feb 2 06:34:54 PST 2006


Author: ekato
Date: 2006-02-02 06:34:50 -0800 (Thu, 02 Feb 2006)
New Revision: 3081

Modified:
   trunk/helper/toolbar-common-gtk.c
Log:
* helper/toolbar-common-gtk.c (popup_prop_menu) : Destroy old menu
  items to plug leak.


Modified: trunk/helper/toolbar-common-gtk.c
===================================================================
--- trunk/helper/toolbar-common-gtk.c	2006-02-02 14:26:13 UTC (rev 3080)
+++ trunk/helper/toolbar-common-gtk.c	2006-02-02 14:34:50 UTC (rev 3081)
@@ -203,7 +203,7 @@
 
   i = 0;
   while ((menu_item = g_list_nth_data(menu_item_list, i)) != NULL) {    
-    gtk_container_remove(GTK_CONTAINER(prop_menu), menu_item);
+    gtk_widget_destroy(menu_item);
     i++;
   }
 
@@ -243,9 +243,8 @@
     gtk_widget_show(menu_item);
     g_signal_connect(G_OBJECT(menu_item), "activate", 
 		     G_CALLBACK(prop_menu_activate), prop_menu);
-    g_object_set_data_full(G_OBJECT(menu_item), "prop_action",
-			   g_list_nth_data(action_list, i),
-			   (GDestroyNotify)g_free);
+    g_object_set_data(G_OBJECT(menu_item), "prop_action",
+		      g_list_nth_data(action_list, i));
     i++;
   }
 
@@ -619,7 +618,6 @@
   g_free(charset);
 }
 
-
 static void
 helper_toolbar_parse_helper_str(GtkWidget *widget, gchar *str)
 {



More information about the uim-commit mailing list