# HG changeset patch # User Luke Schierer # Date 1043555234 0 # Node ID 31834b4598eb1b8f373af22c758a91f2bc44db66 # Parent 64d845f2a0fb1e632dddd31fb5b6d9b80985c87c [gaim-migrate @ 4694] (23:26:06) deryni: Black on Black is not the best color choice this should let you use custom colors again. thanks deryni! committer: Tailor Script diff -r 64d845f2a0fb -r 31834b4598eb src/dialogs.c --- a/src/dialogs.c Sun Jan 26 04:23:20 2003 +0000 +++ b/src/dialogs.c Sun Jan 26 04:27:14 2003 +0000 @@ -3125,7 +3125,6 @@ gtkconv = GAIM_GTK_CONVERSATION(c); gtkconv->fg_color = text_color; - gtkconv->has_fg = TRUE; g_snprintf(open_tag, 23, "", text_color.red / 256, text_color.green / 256, @@ -3156,7 +3155,6 @@ gtkconv = GAIM_GTK_CONVERSATION(c); gtkconv->bg_color = text_color; - gtkconv->has_bg = TRUE; g_snprintf(open_tag, 25, "", text_color.red / 256, text_color.green / 256, diff -r 64d845f2a0fb -r 31834b4598eb src/gtkconv.c --- a/src/gtkconv.c Sun Jan 26 04:23:20 2003 +0000 +++ b/src/gtkconv.c Sun Jan 26 04:27:14 2003 +0000 @@ -418,7 +418,7 @@ strcpy(buf, buf2); } - if ((font_options & OPT_FONT_FGCOL) || gtkconv->has_fg) { + if (font_options & OPT_FONT_FGCOL) { g_snprintf(buf2, limit, "%s", gtkconv->fg_color.red / 256, @@ -427,12 +427,12 @@ strcpy(buf, buf2); } - if ((font_options & OPT_FONT_BGCOL) || gtkconv->has_bg) { + if (font_options & OPT_FONT_BGCOL) { g_snprintf(buf2, limit, "%s", - gtkconv->fg_color.red / 256, - gtkconv->fg_color.green / 256, - gtkconv->fg_color.blue / 256, buf); + gtkconv->bg_color.red / 256, + gtkconv->bg_color.green / 256, + gtkconv->bg_color.blue / 256, buf); strcpy(buf, buf2); } } @@ -3301,6 +3301,9 @@ gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); gtkconv->tooltips = gtk_tooltips_new(); + /* Setup the foreground and background colors */ + gaim_gtkconv_update_font_colors(conv); + if (conv_type == GAIM_CONV_CHAT) { gtkconv->u.chat = g_malloc0(sizeof(struct gaim_gtk_chat_pane)); @@ -4597,6 +4600,21 @@ } void +gaim_gtkconv_update_font_colors(struct gaim_conversation *conv) +{ + struct gaim_gtk_conversation *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; + +} + +void gaim_gtkconv_update_tabs(void) { GList *l; diff -r 64d845f2a0fb -r 31834b4598eb src/gtkconv.h --- a/src/gtkconv.h Sun Jan 26 04:23:20 2003 +0000 +++ b/src/gtkconv.h Sun Jan 26 04:27:14 2003 +0000 @@ -107,8 +107,6 @@ { gboolean make_sound; gboolean has_font; - gboolean has_fg; - gboolean has_bg; char fontface[128]; GdkColor fg_color; GdkColor bg_color; @@ -253,6 +251,12 @@ void gaim_gtkconv_update_font_buttons(void); /** + * Updates the font colors of each conversation to the new colors + * chosen in the prefs dialog. + */ +void gaim_gtkconv_update_font_colors(struct gaim_conversation *conv); + +/** * Updates the tab positions on all conversation windows to reflect any * changed preferences. */ diff -r 64d845f2a0fb -r 31834b4598eb src/prefs.c --- a/src/prefs.c Sun Jan 26 04:23:20 2003 +0000 +++ b/src/prefs.c Sun Jan 26 04:27:14 2003 +0000 @@ -2069,6 +2069,7 @@ destroy_colorsel(NULL, (void *)0); update_color(NULL, pref_bg_picture); } + gaim_conversation_foreach(gaim_gtkconv_update_font_colors); } void update_color(GtkWidget *w, GtkWidget *pic)