From 497db3688f51985369e47f72ef283c4c085637d6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 15 Apr 2010 15:31:53 -0500 Subject: Killing hte launcher shortcuts on exit as well. --- src/messages-service.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/messages-service.c b/src/messages-service.c index 53532dd..da5b49c 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -1271,6 +1271,14 @@ destroy_launcher (gpointer data) g_list_free(li->appdiritems); if (li->menuitem != NULL) { + /* If there are shortcuts remove them */ + GList * shortcuts = launcher_menu_item_get_items(li->menuitem); + while (shortcuts != NULL) { + dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(shortcuts->data), DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); + dbusmenu_menuitem_child_delete(DBUSMENU_MENUITEM(data), DBUSMENU_MENUITEM(shortcuts->data)); + shortcuts = g_list_next(shortcuts); + } + dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(li->menuitem), DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); dbusmenu_menuitem_child_delete(root_menuitem, DBUSMENU_MENUITEM(li->menuitem)); g_object_unref(G_OBJECT(li->menuitem)); -- cgit v1.2.3