Mercurial > pidgin.yaz
comparison src/prefs.c @ 8705:543b19a96ac5
[gaim-migrate @ 9458]
" All preferences in gaim, except for "No sounds when you
log in", are "positive" preferences. For consistency
and to make it a bit easier to understand the
preference I think they should all be "positive"
preferences (there's probably something about this in
some HIG somewhere too)
This patch:
1. changes "No sounds when you log in" to "Sounds when
you log in"
2. adds a helper function for renaming old boolean
prefs and inverting their meaning
(gaim_prefs_rename_boolean_toggle)
3. Moves existing renames from prefs.c to gtkprefs.c
because they all reference gtk preferences.
Default behaviour for new users remains the same (no
sounds during log in), and existing user's preferences
are migrated correctly." --Stu Tomlinson
at one point possitive preferences were policy, i think we should maintain that policy.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 18 Apr 2004 19:30:19 +0000 |
parents | 68d8280c5e13 |
children | 7a67c459ab8f |
comparison
equal
deleted
inserted
replaced
8704:581c94348984 | 8705:543b19a96ac5 |
---|---|
624 } | 624 } |
625 | 625 |
626 remove_pref(oldpref); | 626 remove_pref(oldpref); |
627 } | 627 } |
628 | 628 |
629 void gaim_prefs_rename_old() { | 629 void gaim_prefs_rename_boolean_toggle(const char *oldname, const char *newname) { |
630 gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims"); | 630 struct gaim_pref *oldpref, *newpref; |
631 gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats"); | 631 |
632 gaim_prefs_rename("/core/conversations/placement", | 632 gaim_debug_info("prefs", "Attempting to rename and toggle %s to %s\n", oldname, newname); |
633 "/gaim/gtk/conversations/placement"); | 633 |
634 oldpref = find_pref(oldname); | |
635 newpref = find_pref(newname); | |
636 | |
637 /* it's already been renamed, call off the cats */ | |
638 if(!oldpref) | |
639 return; | |
640 | |
641 g_return_if_fail(newpref != NULL); /* the new one needs to be created */ | |
642 g_return_if_fail(oldpref->type == newpref->type); | |
643 g_return_if_fail(oldpref->type == GAIM_PREF_BOOLEAN); | |
644 g_return_if_fail(oldpref->first_child == NULL); /* can't rename parents */ | |
645 | |
646 gaim_prefs_set_bool(newname, !(oldpref->value.boolean)); | |
647 | |
648 remove_pref(oldpref); | |
649 | |
634 } | 650 } |
635 | 651 |
636 guint gaim_prefs_connect_callback(const char *name, GaimPrefCallback func, gpointer data) | 652 guint gaim_prefs_connect_callback(const char *name, GaimPrefCallback func, gpointer data) |
637 { | 653 { |
638 struct gaim_pref *pref = find_pref(name); | 654 struct gaim_pref *pref = find_pref(name); |