aboutsummaryrefslogtreecommitdiff
path: root/src/user-menu-mgr.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-23 17:14:35 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-23 17:14:35 +0100
commitc8335dabc0de12258ff397924e264cc02ae86554 (patch)
treea47c470cba8e229e9585197ae3c7850276b91f2d /src/user-menu-mgr.c
parent62d5071180e89c16c32d7b1bfee4410d37bee5f5 (diff)
downloadayatana-indicator-session-c8335dabc0de12258ff397924e264cc02ae86554.tar.gz
ayatana-indicator-session-c8335dabc0de12258ff397924e264cc02ae86554.tar.bz2
ayatana-indicator-session-c8335dabc0de12258ff397924e264cc02ae86554.zip
user menu now shown if guest session is possible also guest name has been set on the panel
Diffstat (limited to 'src/user-menu-mgr.c')
-rw-r--r--src/user-menu-mgr.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 9d76b8b..424706e 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -173,7 +173,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
gboolean user_menu_is_visible = FALSE;
if (!greeter_mode){
- user_menu_is_visible = self->user_count > 1;
+ user_menu_is_visible = self->user_count > 1 || check_guest_session();
}
session_dbus_set_user_menu_visibility (self->session_dbus_interface,
@@ -240,9 +240,15 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
USER_ITEM_PROP_IS_CURRENT_USER,
logged_in);
if (logged_in == TRUE){
- 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 (check_guest_session() == TRUE){
+ 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{
+ session_dbus_set_users_real_name (self->session_dbus_interface,
+ _("Guest"));
+ }
}
dbusmenu_menuitem_child_append (self->root_item, mi);