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 740851 - [PATCH] widget-factory: Add a row separator to the tree view
[PATCH] widget-factory: Add a row separator to the tree view
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.13.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-11-28 13:58 UTC by Christoph Reiter (lazka)
Modified: 2014-11-30 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch-v1 (3.06 KB, patch)
2014-11-28 13:58 UTC, Christoph Reiter (lazka)
accepted-commit_now Details | Review

Description Christoph Reiter (lazka) 2014-11-28 13:58:01 UTC
Created attachment 291719 [details] [review]
patch-v1

This adds a row separator to the tree view on page 1 of the gtk3-widget-factory by adding an additional column to the list store and setting a GtkTreeViewRowSeparatorFunc.

Why:

* The color of the separator is wrong in gtk 3.14/trunk if the
  window is not focused. Having it in gtk3-widget-factory will
  prevent such bugs in the future.

* There are drawing bugs with non-Adwaita themes which I'd like
  to reference/show using the gtk3-widget-factory as an example.
Comment 1 Matthias Clasen 2014-11-29 03:05:53 UTC
Review of attachment 291719 [details] [review]:

Looks fine, otherwise

::: demos/widget-factory/widget-factory.c
@@ +1096,3 @@
+  is_sep = g_value_get_boolean (&value);
+  g_value_unset (&value);
+  return is_sep;

I would write this as

  gtk_tree_model_get (model, iter, 4, &is_sep, -1);
  return is_sep;
Comment 2 Matthias Clasen 2014-11-29 23:51:19 UTC
Ended up putting the separator into the tree on page 3, since the one on
page 1 is reorderable, and thus seems an odd fit for a separator.
Comment 3 Christoph Reiter (lazka) 2014-11-30 13:54:56 UTC
Thanks!