| 164 g_list_free(list); |
164 g_list_free(list); |
| 165 } |
165 } |
| 166 return field; |
166 return field; |
| 167 } |
167 } |
| 168 |
168 |
| |
169 static GList * |
| |
170 get_sound_methods() |
| |
171 { |
| |
172 GList *list = NULL; |
| |
173 list = g_list_append(list,(char *)_("Console Beep")); |
| |
174 list = g_list_append(list,"beep"); |
| |
175 list = g_list_append(list,(char *)_("Automatic")); |
| |
176 list = g_list_append(list,"automatic"); |
| |
177 list = g_list_append(list,(char *)_("ESD")); |
| |
178 list = g_list_append(list,"esd"); |
| |
179 list = g_list_append(list,(char *)_("ALSA")); |
| |
180 list = g_list_append(list,"alsa"); |
| |
181 list = g_list_append(list,(char *)_("Command")); |
| |
182 list = g_list_append(list,"custome"); |
| |
183 list = g_list_append(list,(char *)_("No Sound")); |
| |
184 list = g_list_append(list,"none"); |
| |
185 return list; |
| |
186 } |
| |
187 |
| 169 static Prefs blist[] = |
188 static Prefs blist[] = |
| 170 { |
189 { |
| 171 {PURPLE_PREF_BOOLEAN, "/finch/blist/idletime", N_("Show Idle Time"), NULL}, |
190 {PURPLE_PREF_BOOLEAN, "/finch/blist/idletime", N_("Show Idle Time"), NULL}, |
| 172 {PURPLE_PREF_BOOLEAN, "/finch/blist/showoffline", N_("Show Offline Buddies"), NULL}, |
191 {PURPLE_PREF_BOOLEAN, "/finch/blist/showoffline", N_("Show Offline Buddies"), NULL}, |
| 173 {PURPLE_PREF_NONE, NULL, NULL, NULL} |
192 {PURPLE_PREF_NONE, NULL, NULL, NULL} |
| 196 {PURPLE_PREF_BOOLEAN, "/purple/away/away_when_idle", "Change status when idle", NULL}, |
215 {PURPLE_PREF_BOOLEAN, "/purple/away/away_when_idle", "Change status when idle", NULL}, |
| 197 {PURPLE_PREF_INT, "/purple/away/mins_before_away", "Minutes before changing status", NULL}, |
216 {PURPLE_PREF_INT, "/purple/away/mins_before_away", "Minutes before changing status", NULL}, |
| 198 {PURPLE_PREF_INT, "/purple/savedstatus/idleaway", "Change status to", get_status_titles}, |
217 {PURPLE_PREF_INT, "/purple/savedstatus/idleaway", "Change status to", get_status_titles}, |
| 199 {PURPLE_PREF_NONE, NULL, NULL, NULL}, |
218 {PURPLE_PREF_NONE, NULL, NULL, NULL}, |
| 200 }; |
219 }; |
| |
220 |
| |
221 static Prefs sound[] = |
| |
222 { |
| |
223 {PURPLE_PREF_STRING, FINCH_PREFS_ROOT "/sound/method", "Method", get_sound_methods}, |
| |
224 {PURPLE_PREF_BOOLEAN, FINCH_PREFS_ROOT "/sound/mute", "Mute the Sound", NULL}, |
| |
225 {PURPLE_PREF_NONE, NULL, NULL, NULL}, |
| |
226 }; |
| |
227 |
| 201 |
228 |
| 202 static void |
229 static void |
| 203 free_strings() |
230 free_strings() |
| 204 { |
231 { |
| 205 g_list_foreach(freestrings, (GFunc)g_free, NULL); |
232 g_list_foreach(freestrings, (GFunc)g_free, NULL); |
| 239 |
266 |
| 240 add_pref_group(fields, _("Buddy List"), blist); |
267 add_pref_group(fields, _("Buddy List"), blist); |
| 241 add_pref_group(fields, _("Conversations"), convs); |
268 add_pref_group(fields, _("Conversations"), convs); |
| 242 add_pref_group(fields, _("Logging"), logging); |
269 add_pref_group(fields, _("Logging"), logging); |
| 243 add_pref_group(fields, _("Idle"), idle); |
270 add_pref_group(fields, _("Idle"), idle); |
| |
271 add_pref_group(fields, _("Sound"),sound); |
| 244 |
272 |
| 245 purple_request_fields(NULL, _("Preferences"), NULL, NULL, fields, |
273 purple_request_fields(NULL, _("Preferences"), NULL, NULL, fields, |
| 246 _("Save"), G_CALLBACK(save_cb), _("Cancel"), free_strings, |
274 _("Save"), G_CALLBACK(save_cb), _("Cancel"), free_strings, |
| 247 NULL, NULL, NULL, |
275 NULL, NULL, NULL, |
| 248 NULL); |
276 NULL); |