[uim-commit] r3149 - trunk/helper

ekato at freedesktop.org ekato at freedesktop.org
Wed Mar 1 01:29:29 PST 2006


Author: ekato
Date: 2006-03-01 01:29:24 -0800 (Wed, 01 Mar 2006)
New Revision: 3149

Modified:
   trunk/helper/toolbar-common-gtk.c
Log:
* helper/toolbar-common-gtk.c (destroy_tooltips) : New.
(popup_prop_menu) : Plug leak.
(prop_button_destroy) : Ditto.
(tool_button_destroy) : Ditto.


Modified: trunk/helper/toolbar-common-gtk.c
===================================================================
--- trunk/helper/toolbar-common-gtk.c	2006-03-01 00:26:36 UTC (rev 3148)
+++ trunk/helper/toolbar-common-gtk.c	2006-03-01 09:29:24 UTC (rev 3149)
@@ -177,6 +177,15 @@
 }
 
 static void
+destroy_tooltips(GtkWidget *widget)
+{
+  GtkTooltipsData *ttd = gtk_tooltips_data_get(widget);
+
+  if (ttd)
+   g_signal_emit_by_name(ttd->tooltips, "destroy");
+}
+
+static void
 calc_menu_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
 		   GtkWidget *button)
 {
@@ -268,6 +277,7 @@
   state_list = g_object_get_data(G_OBJECT(prop_button), "prop_state");
 
   while (menu_item_list) {
+    destroy_tooltips(menu_item_list->data);
     gtk_widget_destroy(menu_item_list->data);
     menu_item_list = menu_item_list->next;
   }
@@ -435,6 +445,7 @@
 static void
 prop_button_destroy(gpointer data, gpointer user_data)
 {
+  destroy_tooltips(data);
   prop_data_flush(data);
   gtk_widget_destroy(GTK_WIDGET(data));
 }
@@ -442,6 +453,7 @@
 static void
 tool_button_destroy(gpointer data, gpointer user_data)
 {
+  destroy_tooltips(data);
   gtk_widget_destroy(GTK_WIDGET(data));
 }
 



More information about the uim-commit mailing list