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 689624 - Let setting values through GtkTreeModelFilter
Let setting values through GtkTreeModelFilter
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-04 13:55 UTC by Simonas Kazlauskas
Modified: 2013-01-14 16:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch (1.05 KB, patch)
2012-12-04 13:55 UTC, Simonas Kazlauskas
reviewed Details | Review
Small file demonstrating behaviour. (649 bytes, text/x-python)
2013-01-14 14:54 UTC, Simonas Kazlauskas
  Details
Small file demonstrating API (947 bytes, text/x-python)
2013-01-14 15:09 UTC, Simonas Kazlauskas
  Details

Description Simonas Kazlauskas 2012-12-04 13:55:33 UTC
Created attachment 230656 [details] [review]
A patch

With this patch you can set values in cells the same way you would do that in regular TreeModels (TreeStore, ListStore).

Also without this patch it is especially awkward to work with nested filters.
Comment 1 Martin Pitt 2013-01-14 08:41:37 UTC
Comment on attachment 230656 [details] [review]
A patch

As far as I can see, the C API should have the same behaviour, right? In introspection we would like to stay as close to the original API as possible, unless a Python override dramatically simplifies the code. This doesn't seem to be the case here at first sight, as you only have to call one additional function?

Do you have a small test program which illustrates that behaviour?
Comment 2 Simonas Kazlauskas 2013-01-14 14:54:32 UTC
Created attachment 233445 [details]
Small file demonstrating behaviour.
Comment 3 Simonas Kazlauskas 2013-01-14 14:56:30 UTC
Note that same change may need to be applied for GtkTreeModelSort. I haven't checked that though.
Comment 4 Simonas Kazlauskas 2013-01-14 15:09:41 UTC
Created attachment 233446 [details]
Small file demonstrating API

It may be me who missed some API function(s) which make this kind of manipulation of filtered model data easy though.
Comment 5 Martin Pitt 2013-01-14 16:22:42 UTC
Indeed, that's reasonable; thanks for pointing out!

I committed your patch with a test case:

http://git.gnome.org/browse/pygobject/commit/?id=c90ef9dfac7dd51ec82c99c3605915996bea0f73