aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-01 15:05:10 -0500
committerTed Gould <ted@canonical.com>2009-10-01 15:05:10 -0500
commitd3f418fb7331fa431fef415be10a1c71b024e1fa (patch)
tree75e6afd103ed3caf552d146b66979dd65a281528
parent618fd007fca561e2451ff0c31b4158178a150a7d (diff)
downloadlibdbusmenu-d3f418fb7331fa431fef415be10a1c71b024e1fa.tar.gz
libdbusmenu-d3f418fb7331fa431fef415be10a1c71b024e1fa.tar.bz2
libdbusmenu-d3f418fb7331fa431fef415be10a1c71b024e1fa.zip
Removing on delete
-rw-r--r--libdbusmenu-gtk/menu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c
index 612709e..ff473dc 100644
--- a/libdbusmenu-gtk/menu.c
+++ b/libdbusmenu-gtk/menu.c
@@ -220,6 +220,12 @@ static void
root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGtkMenu * menu)
{
g_debug("Root child deleted");
+ DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
+ GtkWidget * item = GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child));
+ if (item != NULL) {
+ gtk_container_remove(GTK_CONTAINER(menu), item);
+ }
+
if (g_list_length(dbusmenu_menuitem_get_children(root)) == 0) {
gtk_widget_hide(GTK_WIDGET(menu));
}