Mercurial > pidgin.yaz
comparison src/gaimrc.c @ 5684:b61520e71679
[gaim-migrate @ 6104]
sound is now really core/ui split.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 03 Jun 2003 03:33:20 +0000 |
parents | 46d7ad0dfa26 |
children | 3de0e242f9a2 |
comparison
equal
deleted
inserted
replaced
5683:9befba33f7c8 | 5684:b61520e71679 |
---|---|
38 #include "gaim.h" | 38 #include "gaim.h" |
39 #include "prpl.h" | 39 #include "prpl.h" |
40 #include "prefs.h" | 40 #include "prefs.h" |
41 #include "proxy.h" | 41 #include "proxy.h" |
42 #include "sound.h" | 42 #include "sound.h" |
43 #include "gtksound.h" | |
43 #include "pounce.h" | 44 #include "pounce.h" |
44 #include "gtkpounce.h" | 45 #include "gtkpounce.h" |
45 #include "notify.h" | 46 #include "notify.h" |
46 | 47 |
47 #ifdef _WIN32 | 48 #ifdef _WIN32 |
940 gaim_prefs_set_bool("/gaim/gtk/conversations/use_custom_bgcolor", | 941 gaim_prefs_set_bool("/gaim/gtk/conversations/use_custom_bgcolor", |
941 (font_options & OPT_FONT_BGCOL)); | 942 (font_options & OPT_FONT_BGCOL)); |
942 | 943 |
943 } else if (!strcmp(p->option, "sound_options")) { | 944 } else if (!strcmp(p->option, "sound_options")) { |
944 sound_options = atoi(p->value[0]); | 945 sound_options = atoi(p->value[0]); |
945 gaim_sound_change_output_method(); | 946 /* XXX: figure out the mapping between the options |
946 /* XXX: still need to convert these */ | 947 * and the new sound method option */ |
947 /* XXX: but first we need to figure out where the split is | |
948 * for sounds */ | |
949 } else if (!strcmp(p->option, "away_options")) { | 948 } else if (!strcmp(p->option, "away_options")) { |
950 away_options = atoi(p->value[0]); | 949 away_options = atoi(p->value[0]); |
951 gaim_prefs_set_bool("/core/conversations/away_back_on_send", | 950 gaim_prefs_set_bool("/core/conversations/away_back_on_send", |
952 away_options & OPT_AWAY_BACK_ON_IM); | 951 away_options & OPT_AWAY_BACK_ON_IM); |
953 gaim_prefs_set_bool("/core/away/away_when_idle", | 952 gaim_prefs_set_bool("/core/away/away_when_idle", |
1063 | 1062 |
1064 /* this is where we do bugs and compatibility stuff */ | 1063 /* this is where we do bugs and compatibility stuff */ |
1065 if (!(sound_options & (OPT_SOUND_BEEP | OPT_SOUND_NORMAL | OPT_SOUND_ESD | 1064 if (!(sound_options & (OPT_SOUND_BEEP | OPT_SOUND_NORMAL | OPT_SOUND_ESD |
1066 | OPT_SOUND_ARTS | OPT_SOUND_NAS | OPT_SOUND_CMD))) { | 1065 | OPT_SOUND_ARTS | OPT_SOUND_NAS | OPT_SOUND_CMD))) { |
1067 sound_options |= OPT_SOUND_NORMAL; | 1066 sound_options |= OPT_SOUND_NORMAL; |
1068 gaim_sound_change_output_method(); | 1067 /* XXX: I don't think we need this anymore */ |
1069 } | 1068 } |
1070 | 1069 |
1071 if (read_general) { | 1070 if (read_general) { |
1072 if (!read_logging) { | 1071 if (!read_logging) { |
1073 logging_options = 0; | 1072 logging_options = 0; |
1110 { | 1109 { |
1111 int i; | 1110 int i; |
1112 char buf[2048]; | 1111 char buf[2048]; |
1113 struct parse parse_buffer; | 1112 struct parse parse_buffer; |
1114 struct parse *p; | 1113 struct parse *p; |
1114 char *pref_name; | |
1115 | 1115 |
1116 buf[0] = 0; | 1116 buf[0] = 0; |
1117 | 1117 |
1118 for(i=0; i<GAIM_NUM_SOUNDS; i++) | 1118 for(i=0; i<GAIM_NUM_SOUNDS; i++) { |
1119 gaim_sound_set_event_file(i, NULL); | 1119 pref_name = g_strdup_printf("/gaim/gtk/sound/file/%s", |
1120 gaim_gtk_sound_get_event_option(i)); | |
1121 gaim_prefs_set_string(pref_name, ""); | |
1122 g_free(pref_name); | |
1123 } | |
1120 | 1124 |
1121 while (buf[0] != '}') { | 1125 while (buf[0] != '}') { |
1122 if (buf[0] == '#') | 1126 if (buf[0] == '#') |
1123 continue; | 1127 continue; |
1124 | 1128 |
1126 return; | 1130 return; |
1127 | 1131 |
1128 p = parse_line(buf, &parse_buffer); | 1132 p = parse_line(buf, &parse_buffer); |
1129 #ifndef _WIN32 | 1133 #ifndef _WIN32 |
1130 if (!strcmp(p->option, "sound_cmd")) { | 1134 if (!strcmp(p->option, "sound_cmd")) { |
1131 gaim_sound_set_command(p->value[0]); | 1135 gaim_prefs_set_string("/gaim/gtk/sound/command", p->value[0]); |
1132 } else | 1136 } else |
1133 #endif | 1137 #endif |
1134 if (!strncmp(p->option, "sound", strlen("sound"))) { | 1138 if (!strncmp(p->option, "sound", strlen("sound"))) { |
1135 i = p->option[strlen("sound")] - 'A'; | 1139 i = p->option[strlen("sound")] - 'A'; |
1136 | 1140 |
1137 if (p->value[0][0]) | 1141 pref_name = g_strdup_printf("/gaim/gtk/sound/file/%s", |
1138 gaim_sound_set_event_file(i, p->value[0]); | 1142 gaim_gtk_sound_get_event_option(i)); |
1143 gaim_prefs_set_string(pref_name, p->value[0]); | |
1139 } | 1144 } |
1140 } | 1145 } |
1141 } | 1146 } |
1142 | 1147 |
1143 static gboolean gaimrc_parse_proxy_uri(const char *proxy) | 1148 static gboolean gaimrc_parse_proxy_uri(const char *proxy) |