diff options
Diffstat (limited to 'src/status-service.c')
-rw-r--r-- | src/status-service.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/status-service.c b/src/status-service.c index dbb597c..1bd33e9 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -39,7 +39,10 @@ static const gchar * status_icons[STATUS_PROVIDER_STATUS_LAST] = { static DbusmenuMenuitem * root_menuitem = NULL; +static DbusmenuMenuitem * status_menuitem = NULL; static GMainLoop * mainloop = NULL; +static gchar * whoami = "ted"; +static StatusServiceDbus * dbus_interface = NULL; /* A fun little function to actually lock the screen. If, that's what you want, let's do it! */ @@ -98,6 +101,15 @@ build_menu (gpointer data) DbusmenuMenuitem * root = DBUSMENU_MENUITEM(data); g_return_val_if_fail(root != NULL, FALSE); + DbusmenuMenuitem * useritem = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(useritem, "label", whoami); + dbusmenu_menuitem_property_set(useritem, "sensitive", "false"); + dbusmenu_menuitem_child_append(root, useritem); + + status_menuitem = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(status_menuitem, "label", "Status"); + dbusmenu_menuitem_child_append(root, status_menuitem); + StatusProviderStatus i; for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) { DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); @@ -106,7 +118,7 @@ build_menu (gpointer data) dbusmenu_menuitem_property_set(mi, "icon", status_icons[i]); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(status_menu_click), GINT_TO_POINTER(i)); - dbusmenu_menuitem_child_append(root, mi); + dbusmenu_menuitem_child_append(status_menuitem, mi); g_debug("Built %s", status_strings[i]); } @@ -147,6 +159,8 @@ main (int argc, char ** argv) g_idle_add(build_menu, root_menuitem); + dbus_interface = g_object_new(STATUS_SERVICE_DBUS_TYPE, NULL); + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); |