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 357578 - No grid lines are drawn
No grid lines are drawn
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.10.x
Other All
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2006-09-25 09:23 UTC by SECoder
Modified: 2006-10-29 15:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description SECoder 2006-09-25 09:23:37 UTC
Please describe the problem:
On Gtk+ 2.10.x the development team added the option to paint the vertical/horizontal grid lines of a table/tree.

The lines were correctly painted with the first versions of the library.
With 2.10.3 the library gave an error and didn't work, now with the 2.10.4 the error doesn't show anymore but the lines doesn't work neither.

Other errors are still present: 

(SWT:26167): Gdk-CRITICAL **: gdk_gc_new: assertion `drawable != NULL' failed

(SWT:26167): Gdk-CRITICAL **: gdk_gc_copy: assertion `GDK_IS_GC (dst_gc)' failed

(SWT:26167): Gdk-CRITICAL **: gdk_gc_set_values: assertion `GDK_IS_GC (gc)' failed

(SWT:26167): Gdk-CRITICAL **: gdk_gc_set_dashes: assertion `GDK_IS_GC (gc)' failed

(SWT:26167): Gdk-CRITICAL **: gdk_draw_line: assertion `gc != NULL' failed

Are there any workaround and any test?

Steps to reproduce:
1. Adding the "gtk_tree_view_set_grid_lines(tv,GTK_TREE_VIEW_GRID_LINES_BOTH);" to the "testtreeview" test
2. Compiling
3. Running


Actual results:
Grid-lines feature doesn't show and some errors are shown.

Expected results:
The grid-lines show.

Does this happen every time?
Yes

Other information:
Comment 1 Kristian Rietveld 2006-09-25 09:32:13 UTC
I noticed this yesterday, I wonder what broke it.  Will have a fix soon.
Comment 2 Kristian Rietveld 2006-09-25 14:26:03 UTC
Fixed on HEAD, will backmerge later.


2006-09-25  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_set_grid_lines): only attempt
        to create the GCs if the widget is realized. (Fixes #357578).
Comment 3 SECoder 2006-09-26 07:21:51 UTC
Thanks for your quick answer. I patched my code and it works perfect.
The enum GtkTreeViewGridLines was also modified, was it?
Comment 4 Kristian Rietveld 2006-10-29 15:23:56 UTC
(backmerged to 2-10)