diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/session-service.c | 2 | ||||
-rw-r--r-- | src/user-menu-mgr.c | 48 | ||||
-rw-r--r-- | src/users-service-dbus.h | 2 |
3 files changed, 25 insertions, 27 deletions
diff --git a/src/session-service.c b/src/session-service.c index 753e304..e16832c 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -97,7 +97,7 @@ main (int argc, char ** argv) /* Setting up i18n and gettext. Apparently, we need all of these. */ - setlocale (LC_ALL, ""); + setlocale (LC_ALL, "C"); bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); textdomain (GETTEXT_PACKAGE); diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 64b29c5..1b404d3 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -188,17 +188,29 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) for (u = users; u != NULL; u = g_list_next (u)) { user = u->data; - g_debug ("%p: %s", user, user->real_name); + //g_debug ("%p: %s", user, user->real_name); 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")); + } + } + + if (g_strcmp0(user->user_name, "guest") == 0) { /* Check to see if the guest has sessions and so therefore should get a check mark. */ - if (user->sessions != NULL) { - dbusmenu_menuitem_property_set_bool (guest_mi, - USER_ITEM_PROP_LOGGED_IN, - TRUE); - } + dbusmenu_menuitem_property_set_bool (guest_mi, + USER_ITEM_PROP_LOGGED_IN, + user->sessions != NULL); /* If we're showing user accounts, keep going through the list */ if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) { continue; @@ -217,7 +229,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, conflictedname); g_free(conflictedname); } else { - g_debug ("%p: %s", user, user->real_name); + //g_debug ("%p: %s", user, user->real_name); dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, user->real_name); @@ -238,28 +250,14 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) USER_ITEM_ICON_DEFAULT); } - gboolean logged_in = g_strcmp0 (user->user_name, g_get_user_name()) == 0; - g_debug ("user name = %s and g user name = %s", + /*g_debug ("user name = %s and g user name = %s", user->user_name, - g_get_user_name()); + g_get_user_name());*/ dbusmenu_menuitem_property_set_bool (mi, USER_ITEM_PROP_IS_CURRENT_USER, - logged_in); - if (logged_in == 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")); - } - } - + current_user); dbusmenu_menuitem_child_append (self->root_item, mi); g_signal_connect (G_OBJECT (mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h index c3f0171..4dbf2a4 100644 --- a/src/users-service-dbus.h +++ b/src/users-service-dbus.h @@ -57,7 +57,7 @@ struct _UserData /* XXX - MAXIMUM_USERS should be set to 7 once we've * got some gdm issues worked out. */ -#define MINIMUM_USERS 1 +#define MINIMUM_USERS 0 #define MAXIMUM_USERS 7 struct _UsersServiceDbus { |