[gnome-keyring] [ui] Transfer auto-unlock value from prompt properly.



commit 585968e9c143b73ed524b6b20f4b46aecb8ff682
Author: Stef Walter <stef memberwebs com>
Date:   Sun Sep 5 02:53:18 2010 +0000

    [ui] Transfer auto-unlock value from prompt properly.
    
    Was transferring as boolean instead of integer.

 ui/gku-prompt-tool.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/ui/gku-prompt-tool.c b/ui/gku-prompt-tool.c
index 149b06e..2475d84 100644
--- a/ui/gku-prompt-tool.c
+++ b/ui/gku-prompt-tool.c
@@ -446,14 +446,14 @@ static void
 prepare_lock (GtkBuilder *builder, GtkDialog *dialog)
 {
 	GtkWidget *unlock, *area;
-	gboolean unlock_auto;
+	gint unlock_auto;
 	GtkToggleButton *button;
 	gint unlock_idle, unlock_timeout;
 
 	button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "auto_unlock_check"));
 	g_signal_connect (button, "toggled", G_CALLBACK (on_auto_check_unlock_toggled), builder);
-	unlock_auto = g_key_file_get_boolean (input_data, "unlock-options", "unlock-auto", NULL);
-	gtk_toggle_button_set_active (button, unlock_auto);
+	unlock_auto = g_key_file_get_integer (input_data, "unlock-options", "unlock-auto", NULL);
+	gtk_toggle_button_set_active (button, unlock_auto == 0 ? FALSE : TRUE);
 	on_auto_check_unlock_toggled (button, builder);
 
 	unlock = gcr_unlock_options_widget_new ();
@@ -777,8 +777,8 @@ gather_unlock_options (GtkBuilder *builder, GtkDialog *dialog)
 	GtkWidget *unlock;
 
 	button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "auto_unlock_check"));
-	g_key_file_set_boolean (output_data, "unlock-options", "unlock-auto",
-	                        gtk_toggle_button_get_active (button));
+	g_key_file_set_integer (output_data, "unlock-options", "unlock-auto",
+	                        gtk_toggle_button_get_active (button) ? 1 : 0);
 
 	unlock = g_object_get_data (G_OBJECT (dialog), "unlock-options-widget");
 	g_object_get (unlock,



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