GNOME Bugzilla – Bug 357578
No grid lines are drawn
Last modified: 2006-10-29 15:23:56 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:
I noticed this yesterday, I wonder what broke it. Will have a fix soon.
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).
Thanks for your quick answer. I patched my code and it works perfect. The enum GtkTreeViewGridLines was also modified, was it?
(backmerged to 2-10)