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 163851 - headers-clickable property not readable + needs model set
headers-clickable property not readable + needs model set
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.6.x
Other Linux
: Normal normal
: Small API
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-12 19:59 UTC by Richard Hult
Modified: 2005-11-10 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Above mentioned patch (2.13 KB, patch)
2005-01-12 20:02 UTC, Richard Hult
none Details | Review
v1: Adds getter and accessor for headers-clickable (1.32 KB, patch)
2005-06-22 14:16 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review

Description Richard Hult 2005-01-12 19:59:35 UTC
There seems to be a few oddities with the property headers-visible on the
treeview. Attaching a small patch that changes a few things. First it makes the
property readwrite instead of just writable. Then it removes a check in the
setter that checks that there is a model set, which I can't find a reason for.

I've also changed the name of the nick since it was "Visible" instead of
"Headers Visible" to make it more usable. I'm not sure what the string policy
is, so this part maybe needs to be removed.
Comment 1 Richard Hult 2005-01-12 20:01:27 UTC
(Changing subject, I actually meant headers-clickable, except for the string change)
Comment 2 Richard Hult 2005-01-12 20:02:00 UTC
Created attachment 35910 [details] [review]
Above mentioned patch
Comment 3 Jonathan Blandford 2005-01-12 23:20:18 UTC
This patch makes a lot of sense to me.  I can't remember if we had any reason
why it's write only and requires a model.  I don't think we can commit the
string change to stable, as we're string frozen, but please commit the code
changes to HEAD and gtk-2.6.
Comment 4 Matthias Clasen 2005-01-13 14:13:58 UTC
2005-01-13  Matthias Clasen <mclasen@redhat.com>

	* gtk/gtktreeview.c: (gtk_tree_view_class_init),
	(gtk_tree_view_set_headers_clickable): Make the headers-visible
	property readwrite instead of just writable, and remove the
	g_return_if_fail check that there is a model when setting this
	property. Also improve the blurb.  (#163851, Richard Hult)

Comment 5 Richard Hult 2005-01-29 01:05:00 UTC
Hm, I just noticed that there is no implementation in
gtk_tree_view_get_property() for this property, and no getter. I wonder if there
really was a reason for having this property readonly? I can't think of any
though. Would it be possible to fix this in 2.6 or is it for 2.8?
Comment 6 Johan (not receiving bugmail) Dahlin 2005-06-22 14:07:04 UTC
I just ran into this, which seems related to comment 5 by Richard:
 
>>> tv = gtk.TreeView()
>>> tv.get_property('headers-clickable')
/home/jdahlin/.pythonstartup:1: GtkWarning: gtktreeview.c:1280: invalid property
id 5 for "headers-clickable" of type `GParamBoolean' in `GtkTreeView'
Comment 7 Johan (not receiving bugmail) Dahlin 2005-06-22 14:16:58 UTC
Created attachment 48160 [details] [review]
v1: Adds getter and accessor for headers-clickable

Do we need to notify if GtkTreeViewColumn::clickable changes? It'll be quite
messy to check all the other columns to verify that the property really
changed.
Comment 8 Matthias Clasen 2005-06-23 16:39:32 UTC
I think we should add a flag for headers-clickable to the tree view private
struct, just as we have for headers visible. That would also allow us to fix
the bug that columns which get added after calling set_clickable() won't
be made clickable...
Comment 9 Matthias Clasen 2005-11-10 14:13:06 UTC
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols: 
	* gtk/gtktreeview.h: 
	* gtk/gtktreeview.c: Implement a getter for headers-clickable.
	(#163851, Richard Hult)