aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-02 14:58:59 -0500
committerTed Gould <ted@canonical.com>2009-10-02 14:58:59 -0500
commite37049853e8a01f93cbcb05ccc6679a0a3d23308 (patch)
treef873e1073e5a4a4880e731e81e9b1b3ceaa52e2b /libdbusmenu-gtk
parent5040095814d0bf27a6aa2e8b3f3f9a5c1c02f38a (diff)
downloadlibdbusmenu-e37049853e8a01f93cbcb05ccc6679a0a3d23308.tar.gz
libdbusmenu-e37049853e8a01f93cbcb05ccc6679a0a3d23308.tar.bz2
libdbusmenu-e37049853e8a01f93cbcb05ccc6679a0a3d23308.zip
Printing when the GTK Menu item gets destroyed.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/client.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 18dcea8..377f9bc 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -176,6 +176,15 @@ new_menuitem (DbusmenuClient * client, DbusmenuMenuitem * mi, gpointer userdata)
return;
}
+#ifdef MASSIVEDEBUGGING
+static void
+destroy_gmi (GtkMenuItem * gmi, DbusmenuMenuitem * mi)
+{
+ g_debug("Destorying GTK Menuitem for %d", dbusmenu_menuitem_get_id(mi));
+ return;
+}
+#endif
+
/**
dbusmenu_gtkclient_newitem_base:
@client: The client handling everything on this connection
@@ -202,6 +211,9 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem *
/* Attach these two */
g_object_set_data(G_OBJECT(item), data_menuitem, gmi);
g_object_ref(G_OBJECT(gmi));
+ #ifdef MASSIVEDEBUGGING
+ g_signal_connect(G_OBJECT(gmi), "destroy", G_CALLBACK(destroy_gmi), item);
+ #endif
/* DbusmenuMenuitem signals */
g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), gmi);