# HG changeset patch # User Christian Hammond # Date 1043721934 0 # Node ID 2054d842992523f96b82b7ef5a9c656b089ae38e # Parent f5c6e33b101374f79f81378e70974e0094dfa248 [gaim-migrate @ 4713] Setting the font face in preferences works again. Thanks CmdrChalupa. committer: Tailor Script diff -r f5c6e33b1013 -r 2054d8429925 src/gtkconv.c --- a/src/gtkconv.c Mon Jan 27 22:27:02 2003 +0000 +++ b/src/gtkconv.c Tue Jan 28 02:45:34 2003 +0000 @@ -3304,6 +3304,9 @@ /* Setup the foreground and background colors */ gaim_gtkconv_update_font_colors(conv); + /* Setup the font face */ + gaim_gtkconv_update_font_face(conv); + if (conv_type == GAIM_CONV_CHAT) { gtkconv->u.chat = g_malloc0(sizeof(struct gaim_gtk_chat_pane)); @@ -4602,16 +4605,33 @@ void gaim_gtkconv_update_font_colors(struct gaim_conversation *conv) { - struct gaim_gtk_conversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + struct gaim_gtk_conversation *gtkconv; + + if (!GAIM_IS_GTK_CONVERSATION(conv)) + return; + + gtkconv = GAIM_GTK_CONVERSATION(conv); - gtkconv->fg_color.red = fgcolor.red; - gtkconv->fg_color.blue = fgcolor.blue; - gtkconv->fg_color.green = fgcolor.green; - - gtkconv->bg_color.red = bgcolor.red; - gtkconv->bg_color.blue = bgcolor.blue; - gtkconv->bg_color.green = bgcolor.green; - + gtkconv->fg_color.red = fgcolor.red; + gtkconv->fg_color.blue = fgcolor.blue; + gtkconv->fg_color.green = fgcolor.green; + + gtkconv->bg_color.red = bgcolor.red; + gtkconv->bg_color.blue = bgcolor.blue; + gtkconv->bg_color.green = bgcolor.green; +} + +void +gaim_gtkconv_update_font_face(struct gaim_conversation *conv) +{ + struct gaim_gtk_conversation *gtkconv; + + if (!GAIM_IS_GTK_CONVERSATION(conv)) + return; + + gtkconv = GAIM_GTK_CONVERSATION(conv); + + strncpy(gtkconv->fontface, fontface, 128); } void diff -r f5c6e33b1013 -r 2054d8429925 src/gtkconv.h --- a/src/gtkconv.h Mon Jan 27 22:27:02 2003 +0000 +++ b/src/gtkconv.h Tue Jan 28 02:45:34 2003 +0000 @@ -253,10 +253,20 @@ /** * Updates the font colors of each conversation to the new colors * chosen in the prefs dialog. + * + * @param conv The conversation to update. */ void gaim_gtkconv_update_font_colors(struct gaim_conversation *conv); /** + * Updates the font faces of each conversation to the new font + * face chosen in the prefs dialog. + * + * @param conv The conversation to update. + */ +void gaim_gtkconv_update_font_face(struct gaim_conversation *conv); + +/** * Updates the tab positions on all conversation windows to reflect any * changed preferences. */ diff -r f5c6e33b1013 -r 2054d8429925 src/prefs.c --- a/src/prefs.c Mon Jan 27 22:27:02 2003 +0000 +++ b/src/prefs.c Tue Jan 28 02:45:34 2003 +0000 @@ -2420,7 +2420,10 @@ fontface[i] = fontname[i]; i++; } + fontface[i] = 0; g_free(fontname); + + gaim_conversation_foreach(gaim_gtkconv_update_font_face); }