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 634423 - Gtk.ListStore.insert() override request
Gtk.ListStore.insert() override request
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-09 15:22 UTC by Holger Berndt
Modified: 2010-11-10 01:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add overrides for the insert* apis of list_store and tree_store (7.65 KB, patch)
2010-11-09 17:19 UTC, johnp
committed Details | Review

Description Holger Berndt 2010-11-09 15:22:13 UTC
The insert() method of a GtkListStore used to have an override in PyGTK that made it work like Python lists, that is, insert a new element right away instead of creating a new empty row that needs to be filled in a second step.

So, for example,

list_store = Gtk.ListStore(str, str)
list_store.insert(0, ('foo', 'bar')

would insert the a row containing foo and bar at the beginning of the list.
Comment 1 johnp 2010-11-09 17:19:12 UTC
Created attachment 174145 [details] [review]
add overrides for the insert* apis of list_store and tree_store

* add set_row to tree_model as convinience method for both list and tree stores