[gnome-keyring] [prompt] When a non-default unlock option is selected expand.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] [prompt] When a non-default unlock option is selected expand.
- Date: Wed, 8 Sep 2010 02:05:42 +0000 (UTC)
commit 18ffda45b68e4a3b333a99514f64d1e7647922d0
Author: Stef Walter <stef memberwebs com>
Date: Wed Sep 8 02:05:20 2010 +0000
[prompt] When a non-default unlock option is selected expand.
Expand the details when a non-default unlock option is selected.
So that the user is aware of what will happen.
ui/gku-prompt.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ui/gku-prompt.c b/ui/gku-prompt.c
index e1a8fcd..5af7426 100644
--- a/ui/gku-prompt.c
+++ b/ui/gku-prompt.c
@@ -33,6 +33,8 @@
#include "egg/egg-secure-memory.h"
#include "egg/egg-spawn.h"
+#include "gcr/gcr-unlock-options.h"
+
#include "pkcs11/pkcs11i.h"
#include <gcrypt.h>
@@ -910,6 +912,11 @@ gku_prompt_set_unlock_choice (GkuPrompt *self, const gchar *option)
g_return_if_fail (self->pv->input);
g_key_file_set_string (self->pv->input, "unlock-options", "choice", option);
+
+ /* Expand if anything but session unlock is chosen */
+ if (!g_str_equal (option, GCR_UNLOCK_OPTION_SESSION) &&
+ !g_key_file_has_key (self->pv->input, "details", "expanded", NULL))
+ g_key_file_set_boolean (self->pv->input, "details", "expanded", TRUE);
}
guint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]