changeset 28590:107764d98880

This appears to be the correct way to set the spin button value.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 17 Nov 2009 17:16:40 +0000
parents 7141673bd785
children d537567d051f
files pidgin/gtkprefs.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkprefs.c	Tue Nov 17 17:10:22 2009 +0000
+++ b/pidgin/gtkprefs.c	Tue Nov 17 17:16:40 2009 +0000
@@ -2078,11 +2078,8 @@
 				 G_CALLBACK(proxy_print_option), (void *)PROXYPORT);
 
 		if (proxy_info != NULL && purple_proxy_info_get_port(proxy_info) != 0) {
-			char buf[128];
-			g_snprintf(buf, sizeof(buf), "%d",
-				   purple_proxy_info_get_port(proxy_info));
-
-			gtk_entry_set_text(GTK_ENTRY(entry), buf);
+			gtk_spin_button_set_value(GTK_SPIN_BUTTON(entry),
+				purple_proxy_info_get_port(proxy_info));
 		}
 		pidgin_set_accessible_label (entry, label);