Mercurial > pidgin.yaz
comparison src/prefs.c @ 9594:15d09e546cee
[gaim-migrate @ 10437]
I changed the 2 preferences dealing with auto-responses.
It's a drop down box. Check it out.
I also made Gaim not load .gaimrc
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 25 Jul 2004 22:13:03 +0000 |
parents | 45d2ad4ac1c1 |
children | 9fdbfe832fac |
comparison
equal
deleted
inserted
replaced
9593:a64febebdd1e | 9594:15d09e546cee |
---|---|
110 gaim_prefs_add_int("/core/away/mins_before_away", 5); | 110 gaim_prefs_add_int("/core/away/mins_before_away", 5); |
111 /* XXX: internationalized string in prefs...evil */ | 111 /* XXX: internationalized string in prefs...evil */ |
112 gaim_prefs_add_string("/core/away/default_message", | 112 gaim_prefs_add_string("/core/away/default_message", |
113 _("Slightly less boring default")); | 113 _("Slightly less boring default")); |
114 | 114 |
115 /* Away -> Auto Response */ | 115 /* Away -> Auto-Reply */ |
116 gaim_prefs_add_none("/core/away/auto_response"); | 116 if (!gaim_prefs_exists("/core/away/auto_response/enabled") || |
117 gaim_prefs_add_bool("/core/away/auto_response/enabled", TRUE); | 117 !gaim_prefs_exists("/core/away/auto_response/idle_only")) { |
118 gaim_prefs_add_bool("/core/away/auto_response/idle_only", FALSE); | 118 gaim_prefs_add_string("/core/away/auto_reply", "awayidle"); |
119 } else { | |
120 if (!gaim_prefs_get_bool("/core/away/auto_response/enabled")) { | |
121 gaim_prefs_add_string("/core/away/auto_reply", "never"); | |
122 } else { | |
123 if (gaim_prefs_get_bool("/core/away/auto_response/idle_only")) { | |
124 gaim_prefs_add_string("/core/away/auto_reply", "awayidle"); | |
125 } else { | |
126 gaim_prefs_add_string("/core/away/auto_reply", "away"); | |
127 } | |
128 } | |
129 } | |
119 | 130 |
120 /* Buddies */ | 131 /* Buddies */ |
121 gaim_prefs_add_none("/core/buddies"); | 132 gaim_prefs_add_none("/core/buddies"); |
122 gaim_prefs_add_bool("/core/buddies/use_server_alias", TRUE); | 133 gaim_prefs_add_bool("/core/buddies/use_server_alias", TRUE); |
123 | 134 |
497 } else { | 508 } else { |
498 gaim_prefs_add_string_list(name, value); | 509 gaim_prefs_add_string_list(name, value); |
499 } | 510 } |
500 } | 511 } |
501 | 512 |
502 gpointer gaim_prefs_get_generic(const char *name) { | 513 gboolean gaim_prefs_exists(const char *name) { |
503 struct gaim_pref *pref = find_pref(name); | 514 struct gaim_pref *pref = find_pref(name); |
504 | 515 |
505 if(!pref) { | 516 if (pref != NULL) |
506 gaim_debug(GAIM_DEBUG_ERROR, "prefs", | 517 return TRUE; |
507 "gaim_prefs_get_generic: Unknown pref %s\n", name); | 518 |
508 return NULL; | 519 return FALSE; |
509 } | |
510 | |
511 return pref->value.generic; | |
512 } | 520 } |
513 | 521 |
514 GaimPrefType gaim_prefs_get_type(const char *name) { | 522 GaimPrefType gaim_prefs_get_type(const char *name) { |
515 struct gaim_pref *pref = find_pref(name); | 523 struct gaim_pref *pref = find_pref(name); |
516 | 524 |
981 return TRUE; | 989 return TRUE; |
982 } | 990 } |
983 | 991 |
984 void gaim_prefs_update_old() { | 992 void gaim_prefs_update_old() { |
985 /* Remove some no-longer-used prefs */ | 993 /* Remove some no-longer-used prefs */ |
994 gaim_prefs_remove("/core/away/auto_response/enabled"); | |
995 gaim_prefs_remove("/core/away/auto_response/idle_only"); | |
986 gaim_prefs_remove("/core/away/auto_response/in_active_conv"); | 996 gaim_prefs_remove("/core/away/auto_response/in_active_conv"); |
987 gaim_prefs_remove("/core/away/auto_response/sec_before_resend"); | 997 gaim_prefs_remove("/core/away/auto_response/sec_before_resend"); |
998 gaim_prefs_remove("/core/away/auto_response"); | |
988 gaim_prefs_remove("/core/conversations/away_back_on_send"); | 999 gaim_prefs_remove("/core/conversations/away_back_on_send"); |
989 gaim_prefs_remove("/core/conversations/send_urls_as_links"); | 1000 gaim_prefs_remove("/core/conversations/send_urls_as_links"); |
990 gaim_prefs_remove("/core/conversations/im/show_login"); | 1001 gaim_prefs_remove("/core/conversations/im/show_login"); |
991 gaim_prefs_remove("/core/conversations/chat/show_join"); | 1002 gaim_prefs_remove("/core/conversations/chat/show_join"); |
992 gaim_prefs_remove("/core/conversations/chat/show_leave"); | 1003 gaim_prefs_remove("/core/conversations/chat/show_leave"); |