comparison finch/gntrequest.c @ 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 4ca97b26a8fb
children fd27baf1711b
comparison
equal deleted inserted replaced
19100:68a3b83795c6 19104:eb49b371cf9a
672 pt = purple_prefs_get_type(id); 672 pt = purple_prefs_get_type(id);
673 switch (pt) { 673 switch (pt) {
674 case PURPLE_PREF_INT: 674 case PURPLE_PREF_INT:
675 { 675 {
676 long int tmp; 676 long int tmp;
677 if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */ 677 if (type == PURPLE_REQUEST_FIELD_LIST){ /* Lists always return string */
678 sscanf(val, "%ld", &tmp); 678 sscanf(val, "%ld", &tmp);
679 purple_prefs_set_int(id, (gint)tmp); 679 purple_prefs_set_int(id, (gint)tmp);
680 }
681 else{
682 purple_prefs_set_int(id,GPOINTER_TO_INT(val));
683 }
680 break; 684 break;
681 } 685 }
682 case PURPLE_PREF_BOOLEAN: 686 case PURPLE_PREF_BOOLEAN:
683 purple_prefs_set_bool(id, GPOINTER_TO_INT(val)); 687 purple_prefs_set_bool(id, GPOINTER_TO_INT(val));
684 break; 688 break;