aboutsummaryrefslogtreecommitdiff
path: root/src/messages-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-30 17:22:19 -0500
committerTed Gould <ted@gould.cx>2010-03-30 17:22:19 -0500
commitee6bc3c94baf3d985de68e4f6ca1c2d30ab8d811 (patch)
tree7351392e20a44c0a355430ca700461b569e74750 /src/messages-service.c
parente270510a962a72df7452230ca02ab477ac909800 (diff)
downloadayatana-indicator-messages-ee6bc3c94baf3d985de68e4f6ca1c2d30ab8d811.tar.gz
ayatana-indicator-messages-ee6bc3c94baf3d985de68e4f6ca1c2d30ab8d811.tar.bz2
ayatana-indicator-messages-ee6bc3c94baf3d985de68e4f6ca1c2d30ab8d811.zip
Build the separator after checking to see which entry to use. That way we've always got one.
Diffstat (limited to 'src/messages-service.c')
-rw-r--r--src/messages-service.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index f751d77..8321406 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -562,10 +562,6 @@ server_added (IndicateListener * listener, IndicateListenerServer * server, gcha
sl_item->attention = FALSE;
sl_item->count = 0;
- /* Build a separator */
- sl_item->separator = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(sl_item->separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
-
/* Incase we got an indicator first */
GList * alreadythere = g_list_find_custom(serverList, sl_item, serverList_equal);
if (alreadythere != NULL) {
@@ -579,6 +575,10 @@ server_added (IndicateListener * listener, IndicateListenerServer * server, gcha
serverList = g_list_insert_sorted(serverList, sl_item, serverList_sort);
}
+ /* Build a separator */
+ sl_item->separator = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set(sl_item->separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
+
/* Connect the signals up to the menu item */
g_signal_connect(G_OBJECT(menuitem), APP_MENU_ITEM_SIGNAL_COUNT_CHANGED, G_CALLBACK(server_count_changed), sl_item);
g_signal_connect(G_OBJECT(menuitem), APP_MENU_ITEM_SIGNAL_NAME_CHANGED, G_CALLBACK(server_name_changed), menushell);