Merge lp:~cjcurran/indicator-session/utf8-guest-fixes into lp:indicator-session/0.1

Proposed by Conor Curran
Status: Merged
Approved by: Ted Gould
Approved revision: 198
Merged at revision: 196
Proposed branch: lp:~cjcurran/indicator-session/utf8-guest-fixes
Merge into: lp:indicator-session/0.1
Diff against target: 65 lines (+9/-27)
1 file modified
src/user-menu-mgr.c (+9/-27)
To merge this branch: bzr merge lp:~cjcurran/indicator-session/utf8-guest-fixes
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+73405@code.launchpad.net

Description of the change

fixes the lack of user menu during a guest session and the invalid utf8 during a guest session on the panel

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/user-menu-mgr.c'
2--- src/user-menu-mgr.c 2011-08-25 17:52:42 +0000
3+++ src/user-menu-mgr.c 2011-08-30 16:19:24 +0000
4@@ -168,6 +168,10 @@
5 users_service_dbus_set_guest_item (self->users_dbus_interface,
6 guest_mi);
7 }
8+ else{
9+ session_dbus_set_users_real_name (self->session_dbus_interface,
10+ _("Guest"));
11+ }
12
13 GList * users = NULL;
14 users = users_service_dbus_get_user_list (self->users_dbus_interface);
15@@ -176,7 +180,7 @@
16 gboolean user_menu_is_visible = FALSE;
17
18 if (!greeter_mode){
19- user_menu_is_visible = self->user_count > 1 || check_guest_session();
20+ user_menu_is_visible = TRUE;
21 }
22
23 session_dbus_set_user_menu_visibility (self->session_dbus_interface,
24@@ -188,37 +192,15 @@
25
26 for (u = users; u != NULL; u = g_list_next (u)) {
27 user = u->data;
28- //g_debug ("%p: %s", user, user->real_name);
29+ g_debug ("%s: %s", user->user_name, user->real_name);
30 user->service = self->users_dbus_interface;
31 gboolean current_user = g_strcmp0 (user->user_name, g_get_user_name()) == 0;
32 if (current_user == TRUE){
33- if (check_guest_session()){
34- g_debug ("about to set the users real name to %s for user %s",
35- user->real_name, user->user_name);
36- session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);
37- }
38- else{
39- g_debug ("about to set the users real name to GUEST");
40- session_dbus_set_users_real_name (self->session_dbus_interface,
41- _("Guest"));
42- }
43+ g_debug ("about to set the users real name to %s for user %s",
44+ user->real_name, user->user_name);
45+ session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);
46 }
47
48-
49- if (g_strcmp0(user->user_name, "guest") == 0) {
50- /* Check to see if the guest has sessions and so therefore should
51- get a check mark. */
52- dbusmenu_menuitem_property_set_bool (guest_mi,
53- USER_ITEM_PROP_LOGGED_IN,
54- user->sessions != NULL);
55- /* If we're showing user accounts, keep going through the list */
56- if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) {
57- continue;
58- }
59- /* If not, we can stop here */
60- break;
61- }
62-
63 if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) {
64 mi = dbusmenu_menuitem_new ();
65 dbusmenu_menuitem_property_set (mi,

Subscribers

People subscribed via source and target branches