| 34 |
34 |
| 35 #ifdef USE_APPLET |
35 #ifdef USE_APPLET |
| 36 #include "gnome_applet_mgr.h" |
36 #include "gnome_applet_mgr.h" |
| 37 #endif |
37 #endif |
| 38 |
38 |
| |
39 /* for people like myself, who are too lazy to add an away msg :) */ |
| |
40 #define BORING_DEFAULT_AWAY_MSG "sorry, i ran out for a while. bbl" |
| 39 |
41 |
| 40 struct aim_user *current_user = NULL; |
42 struct aim_user *current_user = NULL; |
| 41 GList *aim_users = NULL; |
43 GList *aim_users = NULL; |
| 42 int general_options; |
44 int general_options; |
| 43 int display_options; |
45 int display_options; |
| 44 int sound_options; |
46 int sound_options; |
| 45 int font_options; |
47 int font_options; |
| |
48 char *fontface; |
| |
49 char *fontname; |
| 46 |
50 |
| 47 int report_idle, web_browser; |
51 int report_idle, web_browser; |
| 48 struct save_pos blist_pos; |
52 struct save_pos blist_pos; |
| 49 char web_command[2048]; |
53 char web_command[2048]; |
| 50 char aim_host[512]; |
54 char aim_host[512]; |
| 212 GList *awy = away_messages; |
216 GList *awy = away_messages; |
| 213 struct away_message *a; |
217 struct away_message *a; |
| 214 |
218 |
| 215 fprintf(f, "away {\n"); |
219 fprintf(f, "away {\n"); |
| 216 |
220 |
| 217 while (awy) { |
221 if (awy) |
| 218 char *str1, *str2; |
222 { |
| 219 |
223 while (awy) { |
| 220 a = (struct away_message *)awy->data; |
224 char *str1, *str2; |
| 221 |
225 |
| 222 str1 = escape_text2(a->name); |
226 a = (struct away_message *)awy->data; |
| 223 str2 = escape_text2(a->message); |
227 |
| 224 |
228 str1 = escape_text2(a->name); |
| 225 fprintf(f, "\tmessage { %s } { %s }\n", str1, str2); |
229 str2 = escape_text2(a->message); |
| 226 |
230 |
| 227 /* escape_text2 uses malloc(), so we don't want to g_free these */ |
231 fprintf(f, "\tmessage { %s } { %s }\n", str1, str2); |
| 228 free(str1); |
232 |
| 229 free(str2); |
233 /* escape_text2 uses malloc(), so we don't want to g_free these */ |
| 230 |
234 free(str1); |
| 231 awy = awy->next; |
235 free(str2); |
| 232 } |
236 |
| |
237 awy = awy->next; |
| |
238 } |
| |
239 } |
| |
240 else |
| |
241 fprintf(f, "\tmessage { boring default } { %s }\n", BORING_DEFAULT_AWAY_MSG); |
| 233 |
242 |
| 234 fprintf(f, "}\n"); |
243 fprintf(f, "}\n"); |
| 235 } |
244 } |
| 236 |
245 |
| 237 #ifdef GAIM_PLUGINS |
246 #ifdef GAIM_PLUGINS |
| 442 general_options = atoi(p->value[0]); |
451 general_options = atoi(p->value[0]); |
| 443 } else if (!strcmp(p->option, "display_options")) { |
452 } else if (!strcmp(p->option, "display_options")) { |
| 444 display_options = atoi(p->value[0]); |
453 display_options = atoi(p->value[0]); |
| 445 } else if (!strcmp(p->option, "sound_options")) { |
454 } else if (!strcmp(p->option, "sound_options")) { |
| 446 sound_options = atoi(p->value[0]); |
455 sound_options = atoi(p->value[0]); |
| 447 } else if (!strcmp(p->option, "font_options")) { |
456 } else if (!strcmp(p->option, "font_options")) { |
| 448 font_options = atoi(p->value[0]); |
457 font_options = atoi(p->value[0]); |
| 449 } else if (!strcmp(p->option, "latest_ver")) { |
458 } else if (!strcmp(p->option, "font_face")) { |
| 450 g_snprintf(latest_ver, BUF_LONG, "%s", p->value[0]); |
459 fontface = g_strconcat(p->value[0], '\0'); |
| |
460 } else if (!strcmp(p->option, "font_name")) { |
| |
461 fontname = g_strconcat(p->value[0], '\0'); |
| |
462 } else if (!strcmp(p->option, "latest_ver")) { |
| |
463 g_snprintf(latest_ver, BUF_LONG, "%s", p->value[0]); |
| 451 } else if (!strcmp(p->option, "report_idle")) { |
464 } else if (!strcmp(p->option, "report_idle")) { |
| 452 report_idle = atoi(p->value[0]); |
465 report_idle = atoi(p->value[0]); |
| 453 } else if (!strcmp(p->option, "web_browser")) { |
466 } else if (!strcmp(p->option, "web_browser")) { |
| 454 web_browser = atoi(p->value[0]); |
467 web_browser = atoi(p->value[0]); |
| 455 } else if (!strcmp(p->option, "web_command")) { |
468 } else if (!strcmp(p->option, "web_command")) { |
| 486 |
499 |
| 487 fprintf(f, "options {\n"); |
500 fprintf(f, "options {\n"); |
| 488 fprintf(f, "\tgeneral_options { %d }\n", general_options); |
501 fprintf(f, "\tgeneral_options { %d }\n", general_options); |
| 489 fprintf(f, "\tdisplay_options { %d }\n", display_options); |
502 fprintf(f, "\tdisplay_options { %d }\n", display_options); |
| 490 fprintf(f, "\tsound_options { %d }\n", sound_options); |
503 fprintf(f, "\tsound_options { %d }\n", sound_options); |
| 491 fprintf(f, "\tfont_options { %d }\n", font_options); |
504 fprintf(f, "\tfont_options { %d }\n", font_options); |
| |
505 fprintf(f, "\tfont_face { %s }\n", fontface); |
| |
506 fprintf(f, "\tfont_name { %s }\n", fontname); |
| 492 fprintf(f, "\treport_idle { %d }\n", report_idle); |
507 fprintf(f, "\treport_idle { %d }\n", report_idle); |
| 493 fprintf(f, "\tweb_browser { %d }\n", web_browser); |
508 fprintf(f, "\tweb_browser { %d }\n", web_browser); |
| 494 fprintf(f, "\tweb_command { %s }\n", web_command); |
509 fprintf(f, "\tweb_command { %s }\n", web_command); |
| 495 fprintf(f, "\tproxy_type { %d }\n", proxy_type); |
510 fprintf(f, "\tproxy_type { %d }\n", proxy_type); |
| 496 fprintf(f, "\tproxy_host { %s }\n", proxy_host); |
511 fprintf(f, "\tproxy_host { %s }\n", proxy_host); |