diff options
author | Cody Russell <crussell@canonical.com> | 2009-09-22 14:52:45 -0500 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2009-09-22 14:52:45 -0500 |
commit | 91c2993398771ca1ff5a65003c681724291d9e2f (patch) | |
tree | be53541fe414dd54cf004797adb0f98acc31ff09 /src/users-service.c | |
parent | 51bdf6d04ac6b98019c760c7f12f4315c09cdcb8 (diff) | |
download | ayatana-indicator-session-91c2993398771ca1ff5a65003c681724291d9e2f.tar.gz ayatana-indicator-session-91c2993398771ca1ff5a65003c681724291d9e2f.tar.bz2 ayatana-indicator-session-91c2993398771ca1ff5a65003c681724291d9e2f.zip |
dbus fu updates
Diffstat (limited to 'src/users-service.c')
-rw-r--r-- | src/users-service.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/users-service.c b/src/users-service.c index 7c8ab01..c7c2a53 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -135,6 +135,7 @@ rebuild_items (DbusmenuMenuitem *root, DbusmenuMenuitem *mi = NULL; GList *u; UserData *user; + gchar *error; dbusmenu_menuitem_foreach (root, remove_menu_item, NULL); @@ -145,12 +146,26 @@ rebuild_items (DbusmenuMenuitem *root, g_signal_connect (G_OBJECT (mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), NULL); } + mi = dbusmenu_menuitem_new (); + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, g_strdup_printf ("START (count is %d)", count)); + dbusmenu_menuitem_child_append (root, mi); + + error = users_service_dbus_get_error (service); + + mi = dbusmenu_menuitem_new (); + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, g_strdup_printf ("ERROR: %s", error)); + dbusmenu_menuitem_child_append (root, mi); + + g_print ("count == %d\n", count); + if (count > 1 && count < 7) { for (u = users; u != NULL; u = g_list_next (u)) { user = u->data; + g_print ("user->real_name == %s\n", user->real_name); + mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, user->real_name); dbusmenu_menuitem_child_append (root, mi); @@ -158,6 +173,10 @@ rebuild_items (DbusmenuMenuitem *root, } } + mi = dbusmenu_menuitem_new (); + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, "END"); + dbusmenu_menuitem_child_append (root,mi); + if (check_new_session ()) { mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, _("New Session...")); |