diff src/gtkconv.c @ 4421:31834b4598eb

[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 <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 26 Jan 2003 04:27:14 +0000
parents c90039137172
children 2054d8429925
line wrap: on
line diff
--- 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,
 					   "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>",
 					   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,
 					   "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>",
-					   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;