Mercurial > pidgin.yaz
comparison src/conversation.c @ 3473:0073a014e55b
[gaim-migrate @ 3524]
Fixed font preferences, and removed the title from alert windows.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 30 Aug 2002 03:04:12 +0000 |
parents | d33ec392a5e1 |
children | cfbdfe334975 |
comparison
equal
deleted
inserted
replaced
3472:d33ec392a5e1 | 3473:0073a014e55b |
---|---|
75 | 75 |
76 GtkWidget *all_convos = NULL; | 76 GtkWidget *all_convos = NULL; |
77 GtkWidget *convo_notebook = NULL; | 77 GtkWidget *convo_notebook = NULL; |
78 | 78 |
79 char fontface[128] = { 0 }; | 79 char fontface[128] = { 0 }; |
80 char fontxfld[256] = { 0 }; | 80 |
81 int fontsize = 3; | 81 int fontsize = 3; |
82 extern GdkColor bgcolor; | 82 extern GdkColor bgcolor; |
83 extern GdkColor fgcolor; | 83 extern GdkColor fgcolor; |
84 | 84 |
85 void check_everything(GtkWidget *entry); | 85 void check_everything(GtkWidget *entry); |
625 } | 625 } |
626 | 626 |
627 void set_font_face(char *newfont, struct conversation *c) | 627 void set_font_face(char *newfont, struct conversation *c) |
628 { | 628 { |
629 char *pre_fontface; | 629 char *pre_fontface; |
630 int i, j = 0, k = 0; | 630 |
631 | 631 sprintf(c->fontface, "%s", newfont && *newfont ? newfont : DEFAULT_FONT_FACE); |
632 | |
633 sprintf(c->fontxfld, "%s", newfont && *newfont ? newfont : DEFAULT_FONT_XFLD); | |
634 for (i = 0; i < strlen(c->fontxfld); i++) { | |
635 if (c->fontxfld[i] == '-') { | |
636 if (++j > 2) | |
637 break; | |
638 } else if (j == 2) | |
639 c->fontface[k++] = c->fontxfld[i]; | |
640 } | |
641 c->fontface[k] = '\0'; | |
642 c->hasfont = 1; | 632 c->hasfont = 1; |
643 | 633 |
644 pre_fontface = g_strconcat("<FONT FACE=\"", c->fontface, "\">", NULL); | 634 pre_fontface = g_strconcat("<FONT FACE=\"", c->fontface, "\">", NULL); |
645 surround(c->entry, pre_fontface, "</FONT>"); | 635 surround(c->entry, pre_fontface, "</FONT>"); |
646 gtk_widget_grab_focus(c->entry); | 636 gtk_widget_grab_focus(c->entry); |
2759 c->fg_color_dialog = NULL; | 2749 c->fg_color_dialog = NULL; |
2760 c->bg_color_dialog = NULL; | 2750 c->bg_color_dialog = NULL; |
2761 c->smiley_dialog = NULL; | 2751 c->smiley_dialog = NULL; |
2762 c->link_dialog = NULL; | 2752 c->link_dialog = NULL; |
2763 c->log_dialog = NULL; | 2753 c->log_dialog = NULL; |
2764 sprintf(c->fontxfld, "%s", fontxfld); | |
2765 sprintf(c->fontface, "%s", fontface); | 2754 sprintf(c->fontface, "%s", fontface); |
2766 c->hasfont = 0; | 2755 c->hasfont = 0; |
2767 c->bgcol = bgcolor; | 2756 c->bgcol = bgcolor; |
2768 c->hasbg = 0; | 2757 c->hasbg = 0; |
2769 c->fgcol = fgcolor; | 2758 c->fgcol = fgcolor; |
3331 b = c->data; | 3320 b = c->data; |
3332 c = c->next; | 3321 c = c->next; |
3333 if (b->hasfont) | 3322 if (b->hasfont) |
3334 continue; | 3323 continue; |
3335 sprintf(b->fontface, "%s", fontface); | 3324 sprintf(b->fontface, "%s", fontface); |
3336 sprintf(b->fontxfld, "%s", fontxfld); | |
3337 } | 3325 } |
3338 } | 3326 } |
3339 | 3327 |
3340 #include <gdk-pixbuf/gdk-pixbuf.h> | 3328 #include <gdk-pixbuf/gdk-pixbuf.h> |
3341 | 3329 |