From 3dcc91b1d7d8f8c5cb9e713eeab8c7fcf2437e30 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 31 Mar 2010 09:54:24 -0500 Subject: We only want to increment the position if we didn't find an entry --- src/messages-service.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/messages-service.c') diff --git a/src/messages-service.c b/src/messages-service.c index 515e8b3..88da0e0 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -794,15 +794,16 @@ menushell_foreach_cb (DbusmenuMenuitem * data_mi, gpointer data_ms) { if (msl->found) return; - msl->position++; - if (!IS_APP_MENU_ITEM(data_mi)) { + msl->position++; return; } AppMenuItem * appmenu = APP_MENU_ITEM(data_mi); if (!g_strcmp0(INDICATE_LISTENER_SERVER_DBUS_NAME((IndicateListenerServer*)msl->server), INDICATE_LISTENER_SERVER_DBUS_NAME(app_menu_item_get_server(appmenu)))) { msl->found = TRUE; + } else { + msl->position++; } return; -- cgit v1.2.3