ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03243
[Merge] lp:~chrisccoulson/dbusmenu/bluetooth-applet-fix into lp:dbusmenu
Chris Coulson has proposed merging lp:~chrisccoulson/dbusmenu/bluetooth-applet-fix into lp:dbusmenu.
Requested reviews:
Ted Gould (ted)
For more details, see:
https://code.launchpad.net/~chrisccoulson/dbusmenu/bluetooth-applet-fix/+merge/51764
Seems I broke this with an earlier fix to not create weak pointers multiple times on the same object.
This just fixes it by connecting child-added on GtkMenuShell's when constructing the DbusmenuMenuitem, like all the other signals
--
https://code.launchpad.net/~chrisccoulson/dbusmenu/bluetooth-applet-fix/+merge/51764
Your team ayatana-commits is subscribed to branch lp:dbusmenu.
=== modified file 'libdbusmenu-gtk/parser.c'
--- libdbusmenu-gtk/parser.c 2011-02-24 17:23:47 +0000
+++ libdbusmenu-gtk/parser.c 2011-03-01 15:41:43 +0000
@@ -450,6 +450,17 @@
}
}
+ GtkWidget *submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget));
+ if (submenu)
+ {
+ pdata->shell = submenu;
+ g_signal_connect (G_OBJECT (submenu),
+ "child-added",
+ G_CALLBACK (child_added_cb),
+ mi);
+ g_object_add_weak_pointer(G_OBJECT(submenu), (gpointer*)&pdata->shell);
+ }
+
if (!g_object_get_data (G_OBJECT (widget), "gtk-empty-menu-item") && !GTK_IS_TEAROFF_MENU_ITEM (widget))
{
visible = gtk_widget_get_visible (widget);
Follow ups