Mercurial > pidgin
comparison src/gaimrc.c @ 1525:ba8e6e211af5
[gaim-migrate @ 1535]
icqlib updates. beginnings of system logging.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 03 Mar 2001 00:26:04 +0000 |
parents | 6650776468b3 |
children | 72235e3fcff6 |
comparison
equal
deleted
inserted
replaced
1524:a5c87ada5143 | 1525:ba8e6e211af5 |
---|---|
42 GList *aim_users = NULL; | 42 GList *aim_users = NULL; |
43 int general_options; | 43 int general_options; |
44 int display_options; | 44 int display_options; |
45 int sound_options; | 45 int sound_options; |
46 int font_options; | 46 int font_options; |
47 int logging_options; | |
47 | 48 |
48 int report_idle, web_browser; | 49 int report_idle, web_browser; |
49 struct save_pos blist_pos; | 50 struct save_pos blist_pos; |
50 char web_command[2048]; | 51 char web_command[2048]; |
51 char *sound_file[NUM_SOUNDS]; | 52 char *sound_file[NUM_SOUNDS]; |
608 | 609 |
609 static void gaimrc_read_options(FILE *f) | 610 static void gaimrc_read_options(FILE *f) |
610 { | 611 { |
611 char buf[2048]; | 612 char buf[2048]; |
612 struct parse *p; | 613 struct parse *p; |
614 gboolean read_logging = FALSE; | |
613 | 615 |
614 buf[0] = 0; | 616 buf[0] = 0; |
615 | 617 |
616 while (buf[0] != '}') { | 618 while (buf[0] != '}') { |
617 if (buf[0] == '#') | 619 if (buf[0] == '#') |
628 display_options = atoi(p->value[0]); | 630 display_options = atoi(p->value[0]); |
629 } else if (!strcmp(p->option, "sound_options")) { | 631 } else if (!strcmp(p->option, "sound_options")) { |
630 sound_options = atoi(p->value[0]); | 632 sound_options = atoi(p->value[0]); |
631 } else if (!strcmp(p->option, "font_options")) { | 633 } else if (!strcmp(p->option, "font_options")) { |
632 font_options = atoi(p->value[0]); | 634 font_options = atoi(p->value[0]); |
635 } else if (!strcmp(p->option, "logging_options")) { | |
636 logging_options = atoi(p->value[0]); | |
637 read_logging = TRUE; | |
633 } else if (!strcmp(p->option, "font_face")) { | 638 } else if (!strcmp(p->option, "font_face")) { |
634 if (p->value[0] != NULL) | 639 if (p->value[0] != NULL) |
635 g_snprintf(fontface, sizeof(fontface), "%s", p->value[0]); | 640 g_snprintf(fontface, sizeof(fontface), "%s", p->value[0]); |
636 } else if (!strcmp(p->option, "font_size")) { | 641 } else if (!strcmp(p->option, "font_size")) { |
637 fontsize = atoi(p->value[0]); | 642 fontsize = atoi(p->value[0]); |
658 blist_pos.yoff = atoi(p->value[5]); | 663 blist_pos.yoff = atoi(p->value[5]); |
659 } | 664 } |
660 | 665 |
661 } | 666 } |
662 | 667 |
668 if (!read_logging) { | |
669 logging_options = 0; | |
670 if (general_options & OPT_GEN_LOG_ALL) | |
671 logging_options |= OPT_LOG_ALL; | |
672 if (general_options & OPT_GEN_STRIP_HTML) | |
673 logging_options |= OPT_LOG_STRIP_HTML; | |
674 } | |
675 | |
663 } | 676 } |
664 | 677 |
665 static void gaimrc_write_options(FILE *f) | 678 static void gaimrc_write_options(FILE *f) |
666 { | 679 { |
667 | 680 |
668 fprintf(f, "options {\n"); | 681 fprintf(f, "options {\n"); |
669 fprintf(f, "\tgeneral_options { %d }\n", general_options); | 682 fprintf(f, "\tgeneral_options { %d }\n", general_options); |
670 fprintf(f, "\tdisplay_options { %d }\n", display_options); | 683 fprintf(f, "\tdisplay_options { %d }\n", display_options); |
671 fprintf(f, "\tsound_options { %d }\n", sound_options); | 684 fprintf(f, "\tsound_options { %d }\n", sound_options); |
672 fprintf(f, "\tfont_options { %d }\n", font_options); | 685 fprintf(f, "\tfont_options { %d }\n", font_options); |
686 fprintf(f, "\tlogging_options { %d }\n", logging_options); | |
673 if (fontface) | 687 if (fontface) |
674 fprintf(f, "\tfont_face { %s }\n", fontface); | 688 fprintf(f, "\tfont_face { %s }\n", fontface); |
675 fprintf(f, "\tfont_size { %d }\n", fontsize); | 689 fprintf(f, "\tfont_size { %d }\n", fontsize); |
676 fprintf(f, "\tforeground { %d } { %d } { %d }\n", fgcolor.red, fgcolor.green, fgcolor.blue); | 690 fprintf(f, "\tforeground { %d } { %d } { %d }\n", fgcolor.red, fgcolor.green, fgcolor.blue); |
677 fprintf(f, "\tbackground { %d } { %d } { %d }\n", bgcolor.red, bgcolor.green, bgcolor.blue); | 691 fprintf(f, "\tbackground { %d } { %d } { %d }\n", bgcolor.red, bgcolor.green, bgcolor.blue); |