ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00408
[Merge] lp:~ted/indicator-session/guest-no-lockie into lp:indicator-session
Ted Gould has proposed merging lp:~ted/indicator-session/guest-no-lockie into lp:indicator-session.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
We shouldn't allow locking with the guest account.
--
https://code.launchpad.net/~ted/indicator-session/guest-no-lockie/+merge/12635
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/users-service.c'
--- src/users-service.c 2009-09-29 21:25:35 +0000
+++ src/users-service.c 2009-09-30 02:35:16 +0000
@@ -54,6 +54,7 @@
static UsersServiceDbus *dbus_interface = NULL;
static DbusmenuMenuitem *lock_menuitem = NULL;
+static gboolean is_guest = FALSE;
static DBusGProxy * gdm_settings_proxy = NULL;
static gboolean gdm_auto_login = FALSE;
@@ -81,7 +82,7 @@
}
if (lock_menuitem != NULL) {
- if (gdm_auto_login) {
+ if (gdm_auto_login || is_guest) {
dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
} else {
dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true");
@@ -291,7 +292,7 @@
dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen"));
g_signal_connect(G_OBJECT(lock_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL);
dbusmenu_menuitem_child_append(root, lock_menuitem);
- if (gdm_auto_login) {
+ if (gdm_auto_login || is_guest) {
dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");
} else {
dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true");
@@ -409,6 +410,10 @@
return 1;
}
+ if (!g_strcmp0(g_get_user_name(), "guest")) {
+ is_guest = TRUE;
+ }
+
g_idle_add(build_gdm_proxy, NULL);
dbus_interface = g_object_new (USERS_SERVICE_DBUS_TYPE, NULL);
Follow ups