From aff047a23a15219933657f85311d858d6e458870 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 6 Aug 2009 12:27:39 +0100 Subject: Putting the user name in a menu label. --- src/status-service.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/status-service.c b/src/status-service.c index 4e16788..b804711 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -41,6 +41,7 @@ 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"; /* A fun little function to actually lock the screen. If, that's what you want, let's do it! */ @@ -99,6 +100,11 @@ 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); -- cgit v1.2.3