diff options
author | Ted Gould <ted@canonical.com> | 2009-10-06 20:28:06 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-06 20:28:06 -0400 |
commit | d6c6861081cd6133fd605bae27a9c199b41b1555 (patch) | |
tree | 9fea5e459c9e5fb9e5c4baa4f23312d41956cc9c /src/users-service.c | |
parent | f6fc44d8020fb20200b961359ad581dade9e231b (diff) | |
download | ayatana-indicator-session-d6c6861081cd6133fd605bae27a9c199b41b1555.tar.gz ayatana-indicator-session-d6c6861081cd6133fd605bae27a9c199b41b1555.tar.bz2 ayatana-indicator-session-d6c6861081cd6133fd605bae27a9c199b41b1555.zip |
Setting up the callback
Diffstat (limited to 'src/users-service.c')
-rw-r--r-- | src/users-service.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/users-service.c b/src/users-service.c index 576574b..b4310da 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -59,13 +59,12 @@ static DbusmenuMenuitem *lock_menuitem = NULL; static gint count; static GList *users; -#if 0 /* Respond to the signal of autologin changing to see if the setting for timed login changes. */ static void -gdm_settings_change (gboolean autologin) +gdm_settings_change (void) { - if (autologin) { + if (!will_lock_screen()) { dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false"); } else { dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true"); @@ -73,7 +72,6 @@ gdm_settings_change (gboolean autologin) return; } -#endif static gboolean check_guest_session (void) @@ -299,6 +297,7 @@ main (int argc, char ** argv) } g_idle_add(lock_screen_setup, NULL); + lock_screen_gdm_cb_set(gdm_settings_change); dbus_interface = g_object_new (USERS_SERVICE_DBUS_TYPE, NULL); |