Mercurial > pidgin.yaz
changeset 4438:2054d8429925
[gaim-migrate @ 4713]
Setting the font face in preferences works again. Thanks CmdrChalupa.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 28 Jan 2003 02:45:34 +0000 |
parents | f5c6e33b1013 |
children | 7693d84255e7 |
files | src/gtkconv.c src/gtkconv.h src/prefs.c |
diffstat | 3 files changed, 42 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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. */