changeset 19104:eb49b371cf9a

FIX: Setting an INT field in preferences wasn't working properly. We were checking for a FIELD_LIST but doing the same thing all the time.
author Eric Polino <aluink@pidgin.im>
date Tue, 19 Jun 2007 14:32:08 +0000
parents 68a3b83795c6
children fd27baf1711b 062bb6a591ff
files finch/gntrequest.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntrequest.c	Thu Jun 14 03:54:49 2007 +0000
+++ b/finch/gntrequest.c	Tue Jun 19 14:32:08 2007 +0000
@@ -674,9 +674,13 @@
 				case PURPLE_PREF_INT:
 				{
 					long int tmp;
-					if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */
+					if (type == PURPLE_REQUEST_FIELD_LIST){ /* Lists always return string */
 						sscanf(val, "%ld", &tmp);
-					purple_prefs_set_int(id, (gint)tmp);
+						purple_prefs_set_int(id, (gint)tmp);
+					}
+					else{
+						purple_prefs_set_int(id,GPOINTER_TO_INT(val));
+					}
 					break;
 				}
 				case PURPLE_PREF_BOOLEAN: