aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-07-13 12:02:21 -0500
committerTed Gould <ted@gould.cx>2011-07-13 12:02:21 -0500
commitca536289f57fdddd161c525159cfdcfc0bfe373e (patch)
treee6fae4f92cc8a8d70aceb7acd8d597be1d531761
parentac5886d4e7c0eb396502ad05a96a8196d065af63 (diff)
downloadayatana-indicator-messages-ca536289f57fdddd161c525159cfdcfc0bfe373e.tar.gz
ayatana-indicator-messages-ca536289f57fdddd161c525159cfdcfc0bfe373e.tar.bz2
ayatana-indicator-messages-ca536289f57fdddd161c525159cfdcfc0bfe373e.zip
Putting status items into the menu
-rw-r--r--src/messages-service.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index 4ccd0f1..fd22555 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -48,6 +48,7 @@ static GList * serverList = NULL;
static GList * launcherList = NULL;
static DbusmenuMenuitem * root_menuitem = NULL;
+static DbusmenuMenuitem * status_separator = NULL;
static GMainLoop * mainloop = NULL;
static MessageServiceDbus * dbus_interface = NULL;
@@ -1468,7 +1469,15 @@ main (int argc, char ** argv)
DbusmenuServer * server = dbusmenu_server_new(INDICATOR_MESSAGES_DBUS_OBJECT);
dbusmenu_server_set_root(server, root_menuitem);
- status_items_build(&status_update_callback);
+ /* Add status items */
+ GList * statusitems = status_items_build(&status_update_callback);
+ while (statusitems != NULL) {
+ dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(statusitems->data));
+ statusitems = g_list_next(statusitems);
+ }
+ status_separator = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set(status_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
+ dbusmenu_menuitem_child_append(root_menuitem, status_separator);
/* Start up the libindicate listener */
listener = indicate_listener_ref_default();