finch/gntrequest.c

changeset 17470
8cba93978730
parent 17164
3a005b9e8f28
child 18121
2d8ea56b9097
equal deleted inserted replaced
17469:9b5eb283f01c 17470:8cba93978730
670 } 670 }
671 671
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 {
676 long int tmp;
675 if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */ 677 if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */
676 sscanf(val, "%ld", (long int *)&val); 678 sscanf(val, "%ld", &tmp);
677 purple_prefs_set_int(id, GPOINTER_TO_INT(val)); 679 purple_prefs_set_int(id, (gint)tmp);
678 break; 680 break;
681 }
679 case PURPLE_PREF_BOOLEAN: 682 case PURPLE_PREF_BOOLEAN:
680 purple_prefs_set_bool(id, GPOINTER_TO_INT(val)); 683 purple_prefs_set_bool(id, GPOINTER_TO_INT(val));
681 break; 684 break;
682 case PURPLE_PREF_STRING: 685 case PURPLE_PREF_STRING:
683 purple_prefs_set_string(id, val); 686 purple_prefs_set_string(id, val);

mercurial