diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/user-menu-mgr.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 1b404d3..1747a8a 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -168,6 +168,10 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) users_service_dbus_set_guest_item (self->users_dbus_interface, guest_mi); } + else{ + session_dbus_set_users_real_name (self->session_dbus_interface, + _("Guest")); + } GList * users = NULL; users = users_service_dbus_get_user_list (self->users_dbus_interface); @@ -175,8 +179,9 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) gboolean user_menu_is_visible = FALSE; + // question for Ted, how to detect guest session is enabled. if (!greeter_mode){ - user_menu_is_visible = self->user_count > 1 || check_guest_session(); + user_menu_is_visible = TRUE;//self->user_count > 1 || check_guest_session(); } session_dbus_set_user_menu_visibility (self->session_dbus_interface, @@ -192,20 +197,13 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) user->service = self->users_dbus_interface; gboolean current_user = g_strcmp0 (user->user_name, g_get_user_name()) == 0; if (current_user == TRUE){ - if (check_guest_session()){ - g_debug ("about to set the users real name to %s for user %s", - user->real_name, user->user_name); - session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name); - } - else{ - g_debug ("about to set the users real name to GUEST"); - session_dbus_set_users_real_name (self->session_dbus_interface, - _("Guest")); - } + g_debug ("about to set the users real name to %s for user %s", + user->real_name, user->user_name); + session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name); } - if (g_strcmp0(user->user_name, "guest") == 0) { + if (g_str_has_prefix(user->user_name, "guest-") == TRUE) { /* Check to see if the guest has sessions and so therefore should get a check mark. */ dbusmenu_menuitem_property_set_bool (guest_mi, |