diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-09-06 16:52:08 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-09-06 16:52:08 +0100 |
commit | cf5f3639b23ba4e2bd12fd4b987e67f7a3b3b1d4 (patch) | |
tree | 1ba8ceb912454d0140e601b65656d83d78604cfa /src/user-menu-mgr.c | |
parent | 12f76de565f5af5d9d946d4ebc43b195c34bbea2 (diff) | |
download | ayatana-indicator-session-cf5f3639b23ba4e2bd12fd4b987e67f7a3b3b1d4.tar.gz ayatana-indicator-session-cf5f3639b23ba4e2bd12fd4b987e67f7a3b3b1d4.tar.bz2 ayatana-indicator-session-cf5f3639b23ba4e2bd12fd4b987e67f7a3b3b1d4.zip |
live cd user should now be turned off via new gsettings entry by casper
Diffstat (limited to 'src/user-menu-mgr.c')
-rw-r--r-- | src/user-menu-mgr.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 98f6c8a..16c6e3b 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -18,7 +18,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <libdbusmenu-glib/client.h> - #include "user-menu-mgr.h" #include "settings-helper.h" #include "dbus-shared-names.h" @@ -54,22 +53,19 @@ static void activate_online_accounts (DbusmenuMenuitem *mi, gpointer user_data); static void activate_user_accounts (DbusmenuMenuitem *mi, guint timestamp, - gpointer user_data); - + gpointer user_data); static void user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode); static gboolean check_new_session (); static void user_change (UsersServiceDbus *service, const gchar *user_id, gpointer user_data); - static void ensure_settings_client (); static gboolean is_this_guest_session (void); static void activate_guest_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data); - G_DEFINE_TYPE (UserMenuMgr, user_menu_mgr, G_TYPE_OBJECT); @@ -177,14 +173,18 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) users = users_service_dbus_get_user_list (self->users_dbus_interface); self->user_count = g_list_length(users); - gboolean user_menu_is_visible = FALSE; + gboolean user_menu_is_visible = should_show_user_menu(); - if (!greeter_mode){ - user_menu_is_visible = TRUE; + if (user_menu_is_visible == FALSE || greeter_mode == TRUE){ + session_dbus_set_user_menu_visibility (self->session_dbus_interface, + FALSE); + } + else{ + // This needs to be updated once the ability to query guest session support is available + session_dbus_set_user_menu_visibility (self->session_dbus_interface, + user_menu_is_visible); } - session_dbus_set_user_menu_visibility (self->session_dbus_interface, - user_menu_is_visible); if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) { users = g_list_sort (users, (GCompareFunc)compare_users_by_username); |