diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-08-23 17:14:35 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-08-23 17:14:35 +0100 |
commit | c8335dabc0de12258ff397924e264cc02ae86554 (patch) | |
tree | a47c470cba8e229e9585197ae3c7850276b91f2d /src | |
parent | 62d5071180e89c16c32d7b1bfee4410d37bee5f5 (diff) | |
download | ayatana-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')
-rw-r--r-- | src/device-menu-mgr.c | 2 | ||||
-rw-r--r-- | src/user-menu-mgr.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index e111450..523ea8d 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -740,7 +740,6 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self, gboolean greeter_mode) self->udev_mgr = udev_mgr_new (scanners_menuitem, webcam_menuitem); } - static void device_menu_mgr_rebuild_items (DeviceMenuMgr* self) { @@ -821,7 +820,6 @@ device_menu_mgr_ensure_settings_client (DeviceMenuMgr* self) keybinding_settings = g_settings_new (KEYBINDING_SCHEMA); g_signal_connect(lockdown_settings, "changed::" KEY_LOCK_SCREEN, G_CALLBACK(keybinding_changed), self); } - return; } 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); |