[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Color in GtkText
- From: Gert Scholten <gs2 dds nl>
- To: gtk-app-devel-list redhat com
- Subject: Color in GtkText
- Date: Tue, 24 Nov 1998 22:55:32 +0100 (CET)
Hi,
I've got a problem and I /really/ can't find it ...
I've created a kinda parser to parse escape codes in a GtkText. Until recently
I didn't know how styles worked, so I was stuck with the standard (white)
GtkText BG. When I figured out I only had to set the
->style->base[GTK_STATE_NORMAL] and the
->style->text[GTK_STATE_NORMAL] for the standard FG and BG colors to be
switched. So this worked. The next thing was to let the user configure the
values of the colors. I created a list GdkColor *fgcolor[8] for the bg a
similar one.
The problem suddenly appears here. A "\e[0m" sets both FGcolor and BGcolor that
are passed to gtk_text_insert to NULL, so the default value will be used. The
wierdness comes with the BG colors. If I only have a BG color set, and the
FGcolor is set to NULL I get there errors:
---
Gdk-CRITICAL **: file gdkcolor.c: line 1115 (gdk_color_equal): assertion
`colorb != NULL' failed.
---
One for evry gtk_text_insert call. However, if I insert text with a FG color
/before/ any text with a BG color, the BG colors won't display anymore.
The arrors dissapear along with the BG color.
Then if I use a BG color simultaniously with a FG color it works fine ...
(all colors are properly allocated)
I'm really in the dark now ...
Anyone a idea ???
Gert ...
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]