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 680320 - gtk_tree_view_column_set_attributes () is not introspectable
gtk_tree_view_column_set_attributes () is not introspectable
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-20 13:54 UTC by Manuel Quiñones
Modified: 2012-07-30 23:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch. (2.06 KB, patch)
2012-07-20 13:54 UTC, Manuel Quiñones
committed Details | Review
Improve the testcase in the previous patch (1.71 KB, patch)
2012-07-30 15:58 UTC, Manuel Quiñones
none Details | Review

Description Manuel Quiñones 2012-07-20 13:54:41 UTC
Created attachment 219326 [details] [review]
Patch.

The attached patch adds an override which mimics the C implementation, as gtk_tree_view_column_set_attributes is a wrapper for gtk_tree_view_column_add_attribute.  Thanks to dieterv to help me figure this out on IRC.
Comment 1 Martin Pitt 2012-07-24 13:32:13 UTC
Thanks for this! For a real test case this should verify that the attributes in the list actually take effect. Could you extend it in that regard?
Comment 2 Manuel Quiñones 2012-07-30 15:58:38 UTC
Created attachment 219907 [details] [review]
Improve the testcase in the previous patch
Comment 3 Martin Pitt 2012-07-30 22:43:52 UTC
Thanks! Pushed.
Comment 4 Manuel Quiñones 2012-07-30 23:14:28 UTC
My comment on this patch was not sent.  I never meant to send a patch without some commenting, sorry, so here it goes again... :)

My first try wasn't a test at all, so thanks Martin to ask for an improvement.  Hope this one suffices.  Would be much better to have a getter in gtk, like:

>>> column.get_attribute(cell, MODEL_INDEX)
'text'

But that's not the case.  So calling treeview.get_preferred_size() to get something in cell.props.text as a side effect was the best I could do.  Hope this can be improved in the future.