aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-31 09:54:24 -0500
committerTed Gould <ted@gould.cx>2010-03-31 09:54:24 -0500
commit3dcc91b1d7d8f8c5cb9e713eeab8c7fcf2437e30 (patch)
tree6ca2baecd4df463cef468368df652e0b0a08867b
parent9c8c6c5bc337a6453c6a9ad2b0f3d02af5860e7e (diff)
downloadayatana-indicator-messages-3dcc91b1d7d8f8c5cb9e713eeab8c7fcf2437e30.tar.gz
ayatana-indicator-messages-3dcc91b1d7d8f8c5cb9e713eeab8c7fcf2437e30.tar.bz2
ayatana-indicator-messages-3dcc91b1d7d8f8c5cb9e713eeab8c7fcf2437e30.zip
We only want to increment the position if we didn't find an entry
-rw-r--r--src/messages-service.c5
1 files changed, 3 insertions, 2 deletions
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;