Merge lp:~ted/indicator-session/guest-no-lockie into lp:indicator-session/0.1

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ted/indicator-session/guest-no-lockie
Merge into: lp:indicator-session/0.1
Diff against target: 40 lines
1 file modified
src/users-service.c (+7/-2)
To merge this branch: bzr merge lp:~ted/indicator-session/guest-no-lockie
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Review via email: mp+12635@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

We shouldn't allow locking with the guest account.

Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/users-service.c'
2--- src/users-service.c 2009-09-29 21:25:35 +0000
3+++ src/users-service.c 2009-09-30 02:35:16 +0000
4@@ -54,6 +54,7 @@
5 static UsersServiceDbus *dbus_interface = NULL;
6
7 static DbusmenuMenuitem *lock_menuitem = NULL;
8+static gboolean is_guest = FALSE;
9
10 static DBusGProxy * gdm_settings_proxy = NULL;
11 static gboolean gdm_auto_login = FALSE;
12@@ -81,7 +82,7 @@
13 }
14
15 if (lock_menuitem != NULL) {
16- if (gdm_auto_login) {
17+ if (gdm_auto_login || is_guest) {
18 dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
19 } else {
20 dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true");
21@@ -291,7 +292,7 @@
22 dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen"));
23 g_signal_connect(G_OBJECT(lock_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL);
24 dbusmenu_menuitem_child_append(root, lock_menuitem);
25- if (gdm_auto_login) {
26+ if (gdm_auto_login || is_guest) {
27 dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
28 } else {
29 dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true");
30@@ -409,6 +410,10 @@
31 return 1;
32 }
33
34+ if (!g_strcmp0(g_get_user_name(), "guest")) {
35+ is_guest = TRUE;
36+ }
37+
38 g_idle_add(build_gdm_proxy, NULL);
39
40 dbus_interface = g_object_new (USERS_SERVICE_DBUS_TYPE, NULL);

Subscribers

People subscribed via source and target branches