[gnome-keyring] [dbus] Hide the automatically unlock check when login not usable.



commit 0512a0b5a30b432f53ee8c48d75acd582c5c9c9d
Author: Stef Walter <stef memberwebs com>
Date:   Sun Mar 21 14:24:33 2010 +0000

    [dbus] Hide the automatically unlock check when login not usable.
    
    If the login keyring is locked or not present, hide the auto
    unlock check box since that option isn't usable.

 daemon/dbus/gkd-secret-unlock.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-unlock.c b/daemon/dbus/gkd-secret-unlock.c
index 52e4978..8a70ddc 100644
--- a/daemon/dbus/gkd-secret-unlock.c
+++ b/daemon/dbus/gkd-secret-unlock.c
@@ -200,6 +200,11 @@ prepare_unlock_prompt (GkdSecretUnlock *self, GP11Object *coll, gboolean first)
 
 	g_free (label);
 
+	if (gkd_login_is_usable ())
+		gkd_prompt_show_widget (prompt, "auto_unlock_check");
+	else
+		gkd_prompt_hide_widget (prompt, "auto_unlock_check");
+
 	/* Setup the unlock options */
 	if (first) {
 		template = gp11_object_get_template (coll, CKA_G_CREDENTIAL_TEMPLATE, &error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]