diff options
author | Ted Gould <ted@canonical.com> | 2009-10-01 15:05:10 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-01 15:05:10 -0500 |
commit | d3f418fb7331fa431fef415be10a1c71b024e1fa (patch) | |
tree | 75e6afd103ed3caf552d146b66979dd65a281528 | |
parent | 618fd007fca561e2451ff0c31b4158178a150a7d (diff) | |
download | libdbusmenu-d3f418fb7331fa431fef415be10a1c71b024e1fa.tar.gz libdbusmenu-d3f418fb7331fa431fef415be10a1c71b024e1fa.tar.bz2 libdbusmenu-d3f418fb7331fa431fef415be10a1c71b024e1fa.zip |
Removing on delete
-rw-r--r-- | libdbusmenu-gtk/menu.c | 6 |
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)); } |