Do not reset the color if there's something already specified. This should

Sat, 01 Dec 2007 05:46:49 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sat, 01 Dec 2007 05:46:49 +0000
changeset 21823
7ffc28701e1c
parent 21822
20878ac233be
child 21824
c038e2cd8d92

Do not reset the color if there's something already specified. This should
make it possible to have multicolored text in the conversation log. I am
really bad with colors. So I'll leave it to someone else, if any, to decide
the colors for different types of messages.

finch/libgnt/gnttextview.c file | annotate | diff | comparison | revisions
--- a/finch/libgnt/gnttextview.c	Sat Dec 01 04:40:50 2007 +0000
+++ b/finch/libgnt/gnttextview.c	Sat Dec 01 05:46:49 2007 +0000
@@ -650,8 +650,10 @@
 		fl |= (A_DIM | gnt_color_pair(GNT_COLOR_DISABLED));
 	else if (flags & GNT_TEXT_FLAG_HIGHLIGHT)
 		fl |= (A_DIM | gnt_color_pair(GNT_COLOR_HIGHLIGHT));
+	else if ((flags & A_COLOR) == 0)
+		fl |= gnt_color_pair(GNT_COLOR_NORMAL);
 	else
-		fl |= gnt_color_pair(GNT_COLOR_NORMAL);
+		fl |= (flags & A_COLOR);
 
 	return fl;
 }

mercurial