From 6fdaf03987ca48e4ca6683c472405f1e44ff60c5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 22 Jul 2011 12:07:19 -0500 Subject: No need to track the last separator as we now have a menu item below it. --- src/messages-service.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/messages-service.c') diff --git a/src/messages-service.c b/src/messages-service.c index dfa7725..692960d 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -837,7 +837,6 @@ resort_menu (DbusmenuMenuitem * menushell) guint position = 0; GList * serverentry; GList * launcherentry = launcherList; - DbusmenuMenuitem * last_separator = NULL; g_debug("Reordering Menu:"); @@ -874,7 +873,6 @@ resort_menu (DbusmenuMenuitem * menushell) if (!launcher_menu_item_get_eclipsed(li->menuitem)) { /* Only clear the visiblity if we're not eclipsed */ dbusmenu_menuitem_property_set_bool(li->separator, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); - last_separator = li->separator; } position++; @@ -930,7 +928,6 @@ resort_menu (DbusmenuMenuitem * menushell) /* Note, this isn't the last if we can't see it */ } else { dbusmenu_menuitem_property_set_bool(si->separator, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); - last_separator = si->separator; } dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(si->separator), position); @@ -962,19 +959,12 @@ resort_menu (DbusmenuMenuitem * menushell) if (!launcher_menu_item_get_eclipsed(li->menuitem)) { /* Only clear the visiblity if we're not eclipsed */ dbusmenu_menuitem_property_set_bool(li->separator, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); - last_separator = li->separator; } position++; launcherentry = launcherentry->next; } - if (last_separator != NULL) { - dbusmenu_menuitem_property_set_bool(last_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); - } else { - g_warning("No last separator on resort"); - } - return; } -- cgit v1.2.3