aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-09 12:15:07 -0500
committerTed Gould <ted@canonical.com>2009-09-09 12:15:07 -0500
commit240672fb38a107d0ab2dfd9e8daf23262f762a4c (patch)
treeb968aac397dda78415b048c5c2e85815d94e1f38
parent17ac8a0e9bde8373ded7beac533e04c6f300180b (diff)
downloadayatana-indicator-messages-240672fb38a107d0ab2dfd9e8daf23262f762a4c.tar.gz
ayatana-indicator-messages-240672fb38a107d0ab2dfd9e8daf23262f762a4c.tar.bz2
ayatana-indicator-messages-240672fb38a107d0ab2dfd9e8daf23262f762a4c.zip
Handling separators on launchers.
-rw-r--r--src/messages-service.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index 9654e71..e5471ce 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -115,7 +115,6 @@ struct _imList_t {
IndicateListenerServer * server;
IndicateListenerIndicator * indicator;
DbusmenuMenuitem * menuitem;
- DbusmenuMenuitem * separator;
gulong timechange_cb;
gulong attentionchange_cb;
};
@@ -157,6 +156,7 @@ imList_sort (gconstpointer a, gconstpointer b)
typedef struct _launcherList_t launcherList_t;
struct _launcherList_t {
LauncherMenuItem * menuitem;
+ DbusmenuMenuitem * separator;
GList * appdiritems;
};
@@ -1063,11 +1063,16 @@ build_launcher (gpointer data)
g_free(trimdesktop);
ll->appdiritems = g_list_append(NULL, path);
+ /* Build a separator */
+ ll->separator = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set(ll->separator, "type", DBUSMENU_CLIENT_TYPES_SEPARATOR);
+
/* Add it to the list */
launcherList = g_list_insert_sorted(launcherList, ll, launcherList_sort);
/* Add it to the menu */
dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(ll->menuitem));
+ dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(ll->separator));
resort_menu(root_menuitem);
if (blacklist_check(launcher_menu_item_get_desktop(ll->menuitem))) {