| 934 void |
934 void |
| 935 gaim_prefs_rename_boolean_toggle(const char *oldname, const char *newname) |
935 gaim_prefs_rename_boolean_toggle(const char *oldname, const char *newname) |
| 936 { |
936 { |
| 937 struct gaim_pref *oldpref, *newpref; |
937 struct gaim_pref *oldpref, *newpref; |
| 938 |
938 |
| 939 gaim_debug_info("prefs", "Attempting to rename and toggle %s to %s\n", oldname, newname); |
|
| 940 |
|
| 941 oldpref = find_pref(oldname); |
939 oldpref = find_pref(oldname); |
| 942 newpref = find_pref(newname); |
940 newpref = find_pref(newname); |
| 943 |
941 |
| 944 /* it's already been renamed, call off the cats */ |
942 /* it's already been renamed, call off the cats */ |
| 945 if(!oldpref) |
943 if(!oldpref) |
| 946 return; |
944 return; |
| |
945 |
| |
946 gaim_debug_info("prefs", "Renaming and toggling %s to %s\n", oldname, newname); |
| 947 |
947 |
| 948 g_return_if_fail(newpref != NULL); /* the new one needs to be created */ |
948 g_return_if_fail(newpref != NULL); /* the new one needs to be created */ |
| 949 g_return_if_fail(oldpref->type == newpref->type); |
949 g_return_if_fail(oldpref->type == newpref->type); |
| 950 g_return_if_fail(oldpref->type == GAIM_PREF_BOOLEAN); |
950 g_return_if_fail(oldpref->type == GAIM_PREF_BOOLEAN); |
| 951 g_return_if_fail(oldpref->first_child == NULL); /* can't rename parents */ |
951 g_return_if_fail(oldpref->first_child == NULL); /* can't rename parents */ |