After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 468764 - GtkTreeView forgets color setting after first tree operation
GtkTreeView forgets color setting after first tree operation
Status: RESOLVED DUPLICATE of bug 71926
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.10.x
Other All
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2007-08-21 07:54 UTC by Miroslav Rajcic
Modified: 2007-08-21 08:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Miroslav Rajcic 2007-08-21 07:54:38 UTC
Please describe the problem:
I have a tree view that can have custom background color set by the code like this:

GdkColor color;
gdk_color_parse ("#ed4eea860537", &color);
gtk_widget_modify_base(GTK_WIDGET(treeview1), GTK_STATE_NORMAL, &color);

The problem is that the color resets to the white after the first tree operation is made (adding new node into the tree store).
Problem can be reproduced on Ubuntu Feisty and other Linux distros, but the code works fine on Windows OS using http://gladewin32.sourceforge.net (v 2.10.11) 



Steps to reproduce:
1. Get test program from http://notecase.sourceforge.net/test.zip
2. Compile and start, tree view is initially yellow
3. Press "Add" button to add new node into the tree


Actual results:
Tree view becomes white (bkg color)

Expected results:
Tree view should remember its color all the time (as it works correctly on Windows)

Does this happen every time?
Yes

Other information:
Comment 1 Kristian Rietveld 2007-08-21 08:04:12 UTC
What you see here is that every row draws it's own background, overwriting the background color you set on the tree view.  For now you can work around this by setting the odd-row-color and even-row-color properties.

Marking as duplicate of the general background image bug.


*** This bug has been marked as a duplicate of 71926 ***