Mercurial > pidgin
comparison src/gaimrc.c @ 5631:960fe32ea9b7
[gaim-migrate @ 6038]
i'm tired, so i'm committing what i've got
kingant will do a better job with what i hacked into oscar to make it work ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 01 Jun 2003 06:02:03 +0000 |
parents | 83991299705c |
children | b88734ca07b2 |
comparison
equal
deleted
inserted
replaced
5630:4e2ffa3d9094 | 5631:960fe32ea9b7 |
---|---|
155 #define OPT_ACCT_AUTO 0x00000001 | 155 #define OPT_ACCT_AUTO 0x00000001 |
156 /*#define OPT_ACCT_KEEPALV 0x00000002 this shouldn't be optional */ | 156 /*#define OPT_ACCT_KEEPALV 0x00000002 this shouldn't be optional */ |
157 #define OPT_ACCT_REM_PASS 0x00000004 | 157 #define OPT_ACCT_REM_PASS 0x00000004 |
158 #define OPT_ACCT_MAIL_CHECK 0x00000008 | 158 #define OPT_ACCT_MAIL_CHECK 0x00000008 |
159 | 159 |
160 #define IDLE_NONE 0 | |
161 #define IDLE_GAIM 1 | |
162 #define IDLE_SCREENSAVER 2 | |
163 | |
160 static guint misc_options; | 164 static guint misc_options; |
161 static guint logging_options; | 165 static guint logging_options; |
162 static guint blist_options; | 166 static guint blist_options; |
163 static guint convo_options; | 167 static guint convo_options; |
164 static guint im_options; | 168 static guint im_options; |
175 static guint prefs_initial_load = 0; | 179 static guint prefs_initial_load = 0; |
176 guint proxy_info_is_from_gaimrc = 1; /* Only save proxy info if it | 180 guint proxy_info_is_from_gaimrc = 1; /* Only save proxy info if it |
177 * was loaded from the file | 181 * was loaded from the file |
178 * or otherwise explicitly requested */ | 182 * or otherwise explicitly requested */ |
179 | 183 |
180 int report_idle; | 184 static int web_browser; |
181 int web_browser; | 185 static struct save_pos blist_pos; |
182 struct save_pos blist_pos; | 186 static struct window_size conv_size, buddy_chat_size; |
183 struct window_size conv_size, buddy_chat_size; | 187 static char web_command[2048] = ""; |
184 char web_command[2048] = ""; | |
185 | 188 |
186 static GdkColor fgcolor; | 189 static GdkColor fgcolor; |
187 static GdkColor bgcolor; | 190 static GdkColor bgcolor; |
188 | 191 |
189 struct parse { | 192 struct parse { |
784 } else if (!strcmp(p->option, "display_options")) { | 787 } else if (!strcmp(p->option, "display_options")) { |
785 display_options = atoi(p->value[0]); | 788 display_options = atoi(p->value[0]); |
786 read_display = TRUE; | 789 read_display = TRUE; |
787 } else if (!strcmp(p->option, "misc_options")) { | 790 } else if (!strcmp(p->option, "misc_options")) { |
788 misc_options = atoi(p->value[0]); | 791 misc_options = atoi(p->value[0]); |
792 gaim_prefs_set_bool("/gaim/gtk/debug/enabled", | |
793 (misc_options & OPT_MISC_DEBUG)); | |
794 gaim_prefs_set_bool("/gaim/gtk/browsers/new_window", | |
795 (misc_options & OPT_MISC_BROWSER_POPUP)); | |
796 gaim_prefs_set_bool("/gaim/gtk/conversations/im/send_typing", | |
797 !(misc_options & OPT_MISC_STEALTH_TYPING)); | |
798 gaim_prefs_set_bool("/gaim/gtk/buddies/use_server_alias", | |
799 (misc_options & OPT_MISC_USE_SERVER_ALIAS)); | |
789 } else if (!strcmp(p->option, "logging_options")) { | 800 } else if (!strcmp(p->option, "logging_options")) { |
790 logging_options = atoi(p->value[0]); | 801 logging_options = atoi(p->value[0]); |
791 read_logging = TRUE; | 802 read_logging = TRUE; |
803 gaim_prefs_set_bool("/gaim/gtk/logging/log_ims", | |
804 (logging_options & OPT_LOG_CONVOS)); | |
805 gaim_prefs_set_bool("/gaim/gtk/logging/strip_html", | |
806 (logging_options & OPT_LOG_STRIP_HTML)); | |
807 gaim_prefs_set_bool("/gaim/gtk/logging/individual_logs", | |
808 (logging_options & OPT_LOG_INDIVIDUAL)); | |
809 gaim_prefs_set_bool("/gaim/gtk/logging/log_chats", | |
810 (logging_options & OPT_LOG_CHATS)); | |
792 } else if (!strcmp(p->option, "blist_options")) { | 811 } else if (!strcmp(p->option, "blist_options")) { |
793 blist_options = atoi(p->value[0]); | 812 blist_options = atoi(p->value[0]); |
813 gaim_prefs_set_bool("/gaim/gtk/blist/show_group_count", | |
814 (blist_options & OPT_BLIST_SHOW_GRPNUM)); | |
815 gaim_prefs_set_bool("/gaim/gtk/blist/show_idle_time", | |
816 (blist_options & OPT_BLIST_SHOW_IDLETIME)); | |
817 gaim_prefs_set_bool("/gaim/gtk/blist/show_empty_groups", | |
818 !(blist_options & OPT_BLIST_NO_MT_GRP)); | |
819 gaim_prefs_set_bool("/gaim/gtk/blist/show_warning_level", | |
820 (blist_options & OPT_BLIST_SHOW_WARN)); | |
821 gaim_prefs_set_bool("/gaim/gtk/blist/grey_idle_buddies", | |
822 (blist_options & OPT_BLIST_GREY_IDLERS)); | |
823 gaim_prefs_set_bool("/gaim/gtk/blist/raise_on_events", | |
824 (blist_options & OPT_BLIST_POPUP)); | |
825 gaim_prefs_set_bool("/gaim/gtk/blist/show_buddy_icons", | |
826 (blist_options & OPT_BLIST_SHOW_ICONS)); | |
827 gaim_prefs_set_bool("/gaim/gtk/blist/show_offline_buddies", | |
828 (blist_options & OPT_BLIST_SHOW_OFFLINE)); | |
794 } else if (!strcmp(p->option, "convo_options")) { | 829 } else if (!strcmp(p->option, "convo_options")) { |
795 convo_options = atoi(p->value[0]); | 830 convo_options = atoi(p->value[0]); |
831 gaim_prefs_set_bool("/gaim/gtk/conversations/enter_sends", | |
832 (convo_options & OPT_CONVO_ENTER_SENDS)); | |
833 gaim_prefs_set_bool("/core/conversations/send_urls_as_links", | |
834 (convo_options & OPT_CONVO_SEND_LINKS)); | |
835 gaim_prefs_set_bool("/gaim/gtk/conversations/spellcheck", | |
836 (convo_options & OPT_CONVO_CHECK_SPELLING)); | |
837 gaim_prefs_set_bool("/gaim/gtk/conversations/html_shortcuts", | |
838 (convo_options & OPT_CONVO_CTL_CHARS)); | |
839 gaim_prefs_set_bool("/gaim/gtk/conversations/smiley_shortcuts", | |
840 (convo_options & OPT_CONVO_CTL_SMILEYS)); | |
841 gaim_prefs_set_bool("/gaim/gtk/conversations/escape_closes", | |
842 (convo_options & OPT_CONVO_ESC_CAN_CLOSE)); | |
843 gaim_prefs_set_bool("/gaim/gtk/conversations/ctrl_enter_sends", | |
844 (convo_options & OPT_CONVO_CTL_ENTER)); | |
845 gaim_prefs_set_bool("/gaim/gtk/conversations/show_timestamps", | |
846 (convo_options & OPT_CONVO_SHOW_TIME)); | |
847 gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_colors", | |
848 (convo_options & OPT_CONVO_IGNORE_COLOR)); | |
849 gaim_prefs_set_bool("/gaim/gtk/conversations/show_smileys", | |
850 (convo_options & OPT_CONVO_SHOW_SMILEY)); | |
851 gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_fonts", | |
852 (convo_options & OPT_CONVO_IGNORE_FONTS)); | |
853 gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_font_sizes", | |
854 (convo_options & OPT_CONVO_IGNORE_SIZES)); | |
855 gaim_prefs_set_bool("/core/conversations/combine_chat_im", | |
856 (convo_options & OPT_CONVO_COMBINE)); | |
857 gaim_prefs_set_bool("/gaim/gtk/conversations/ctrl_w_closes", | |
858 (convo_options & OPT_CONVO_CTL_W_CLOSES)); | |
859 gaim_prefs_set_bool("/gaim/gtk/conversations/close_on_tabs", | |
860 !(convo_options & OPT_CONVO_NO_X_ON_TAB)); | |
796 } else if (!strcmp(p->option, "im_options")) { | 861 } else if (!strcmp(p->option, "im_options")) { |
797 im_options = atoi(p->value[0]); | 862 im_options = atoi(p->value[0]); |
798 | 863 |
799 gaim_prefs_set_bool("/gaim/gtk/conversations/hide_im_on_send", | 864 gaim_prefs_set_bool("/gaim/gtk/conversations/im/hide_on_send", |
800 (im_options & OPT_IM_POPDOWN)); | 865 (im_options & OPT_IM_POPDOWN)); |
801 | 866 |
802 } else if (!strcmp(p->option, "conv_placement")) { | 867 } else if (!strcmp(p->option, "conv_placement")) { |
803 conv_placement_option = atoi(p->value[0]); | 868 conv_placement_option = atoi(p->value[0]); |
804 gaim_conv_placement_set_active(conv_placement_option); | 869 gaim_conv_placement_set_active(conv_placement_option); |
854 g_snprintf(buf, sizeof(buf), "#%2x%2x%2x", | 919 g_snprintf(buf, sizeof(buf), "#%2x%2x%2x", |
855 atoi(p->value[0]), atoi(p->value[1]), atoi(p->value[2])); | 920 atoi(p->value[0]), atoi(p->value[1]), atoi(p->value[2])); |
856 gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", buf); | 921 gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", buf); |
857 | 922 |
858 } else if (!strcmp(p->option, "report_idle")) { | 923 } else if (!strcmp(p->option, "report_idle")) { |
859 report_idle = atoi(p->value[0]); | 924 switch(atoi(p->value[0])) { |
925 case IDLE_SCREENSAVER: | |
926 gaim_prefs_set_string("/gaim/gtk/idle/reporting_method", | |
927 "system"); | |
928 break; | |
929 case IDLE_GAIM: | |
930 gaim_prefs_set_string("/gaim/gtk/idle/reporting_method", | |
931 "gaim"); | |
932 break; | |
933 default: | |
934 gaim_prefs_set_string("/gaim/gtk/idle/reporting_method", | |
935 "none"); | |
936 break; | |
937 } | |
860 } else if (!strcmp(p->option, "web_browser")) { | 938 } else if (!strcmp(p->option, "web_browser")) { |
861 web_browser = atoi(p->value[0]); | 939 web_browser = atoi(p->value[0]); |
862 } else if (!strcmp(p->option, "web_command")) { | 940 } else if (!strcmp(p->option, "web_command")) { |
863 strcpy(web_command, p->value[0]); | 941 strcpy(web_command, p->value[0]); |
864 } else if (!strcmp(p->option, "smiley_theme")) { | 942 } else if (!strcmp(p->option, "smiley_theme")) { |
1181 } | 1259 } |
1182 } | 1260 } |
1183 | 1261 |
1184 static void set_defaults() | 1262 static void set_defaults() |
1185 { | 1263 { |
1264 #if 0 | |
1186 int i; | 1265 int i; |
1187 struct away_message *a; | 1266 struct away_message *a; |
1188 | 1267 |
1189 misc_options = | 1268 misc_options = |
1190 OPT_MISC_USE_SERVER_ALIAS; | 1269 OPT_MISC_USE_SERVER_ALIAS; |
1266 conv_size.entry_height = 50; | 1345 conv_size.entry_height = 50; |
1267 | 1346 |
1268 buddy_chat_size.width = 320; | 1347 buddy_chat_size.width = 320; |
1269 buddy_chat_size.height = 160; | 1348 buddy_chat_size.height = 160; |
1270 buddy_chat_size.entry_height = 50; | 1349 buddy_chat_size.entry_height = 50; |
1350 #endif | |
1271 } | 1351 } |
1272 | 1352 |
1273 void load_prefs() | 1353 void load_prefs() |
1274 { | 1354 { |
1275 FILE *f; | 1355 FILE *f; |