summaryrefslogtreecommitdiff
path: root/wizard
diff options
context:
space:
mode:
authorDaniele Forsi <dforsi@src.gnome.org>2011-12-18 11:35:15 +0100
committerDaniele Forsi <dforsi@src.gnome.org>2011-12-18 11:48:21 +0100
commitb9f12ef311b02f5557717bd8d1695dce5c88108d (patch)
tree4d1cfc08582ea98086a7611fb8f0ac789748c3fd /wizard
parent62b063dfc2a804b899e466bebf292c5b8c6dbcc1 (diff)
downloadgnome-bluetooth-b9f12ef311b02f5557717bd8d1695dce5c88108d.tar.gz
wizard: do not use a random PIN if user choose a fixed one
User input was checked only in the select_device_changed() callback. https://bugzilla.gnome.org/show_bug.cgi?id=666192
Diffstat (limited to 'wizard')
-rw-r--r--wizard/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wizard/main.c b/wizard/main.c
index 3d75ece5..143fb8b3 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -163,6 +163,7 @@ pincode_callback (GDBusMethodInvocation *invocation,
/* Only show the pincode page if the pincode isn't automatic */
if (automatic_pincode == FALSE)
gtk_assistant_set_current_page (window_assistant, PAGE_SETUP);
+ g_debug ("Using pincode \"%s\"", pincode);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", pincode));
return TRUE;
@@ -778,6 +779,9 @@ pin_option_button_clicked (GtkButton *button,
gtk_dialog_run (GTK_DIALOG (pin_dialog));
gtk_widget_hide (pin_dialog);
+ g_free (pincode);
+ pincode = g_strdup (user_pincode);
+ automatic_pincode = user_pincode != NULL;
}
static int