[gnome-bluetooth/gnome-3-0] wizard: Prepend zeros for SSP passkey display



commit 783b58aeaa6565e3429f89c1b82cfb1c97ccfbae
Author: Bastien Nocera <hadess hadess net>
Date:   Wed May 25 16:35:29 2011 +0100

    wizard: Prepend zeros for SSP passkey display
    
    http://thread.gmane.org/gmane.linux.bluez.kernel/13216
    https://bugzilla.gnome.org/show_bug.cgi?id=646253

 wizard/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/wizard/main.c b/wizard/main.c
index 697b040..a8ecad9 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -250,7 +250,7 @@ confirm_callback (DBusGMethodInvocation *context,
 	g_free (label);
 
 	gtk_widget_show (label_ssp_pin);
-	str = g_strdup_printf ("%d", pin);
+	str = g_strdup_printf ("%06d", pin);
 	set_large_label (GTK_LABEL (label_ssp_pin), str);
 	g_free (str);
 
@@ -273,7 +273,7 @@ display_callback (DBusGMethodInvocation *context,
 	target_ssp = TRUE;
 	gtk_assistant_set_current_page (window_assistant, PAGE_SSP_SETUP);
 
-	code = g_strdup_printf("%d", pin);
+	code = g_strdup_printf("%06d", pin);
 
 	if (entered > 0) {
 		GtkEntry *entry;



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