GNOME Bugzilla – Bug 744052
Improve documentation for GtkCellRendererText:*-set properties
Last modified: 2018-04-15 00:04:51 UTC
The purpose of the GtkCellRenderer:*-set properties is unclear, and it is apparently a source of confusion among newcomers to GTK+: • Why are they needed? e.g. Why have :family-set if you can set :family to NULL? • What do they enable or disable? • How do they relate to other properties, e.g. how do :editable and :editable-set relate to :mode and GTK_CELL_RENDERER_MODE_EDITABLE? The same issues exist with GtkTextTag too. The properties are probably here to stay, but the documentation could be clarified.
Isn't that pretty obvious ? The GtkCellRenderer documentation has this explanation: * Many properties of #GtkCellRenderer and its subclasses have a * corresponding “set” property, e.g. “cell-background-set” corresponds * to “cell-background”. These “set” properties reflect whether a property * has been set or not. You should not set them independently. The GtkTextTag docs have similar text: * For each property of #GtkTextTag, there is a “set” property, e.g. * “font-set” corresponds to “font”. These “set” properties reflect * whether a property has been set or not. * They are maintained by GTK+ and you should not set them independently.
(In reply to comment #1) > Isn't that pretty obvious ? Apparently not to newcomers to GTK+, as based on feedback from a client project we ran (see my recent e-mail to DDL, ‘Feedback from downstreams’). > The GtkCellRenderer documentation has this explanation: That’s great, though I guess it could give a bit of motivation about why the -set properties are needed. The problem is that it isn’t discoverable from the documentation of the individual properties in GtkCellRendererText, being in the introductory text for a different class. How would you feel about a patch to slightly expand that explanation and reference it from the documentation for the -set properties?
(In reply to Philip Withnall from comment #2) > How would you feel about a patch to slightly expand that explanation and > reference it from the documentation for the -set properties? Sure, that should be ok. As for why we need it: We need to differentiate between unset (in which case we want to inherit style information from the parent/widget) and set (in which case we don't).
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new