gtk_list_store_reorder() is not introspectable

Bug #886359 reported by Jo-Erlend Schinstad
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

gi.overrides.Gtk.ListStore has no attribute .reorder. Porting a PyGTK app to GI GTK3, I found that sorting a TreeView is no longer possible because GTK.ListStore doesn't provide a .reorder method. Reading the source code, I found that pygobject indeed doesn't have any override for .reorder. This is the source code I'm talking about: http://git.gnome.org/browse/pygobject/tree/gi/overrides/Gtk.py

This is something I can't fix, but since it's likely that many Python GTK apps use TreeViews, it'd be very nice if a wizard could have a look at this ASAP.

Revision history for this message
Barry Warsaw (barry) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Unfortunately gtk_list_store_reorder() cannot be used by language bindings, as the pointer value cannot safely be handled by interpreters (it has neither a defined length nor is NULL TERMINATED). Thus it was marked as non-introspectable. http://git.gnome.org/browse/gtk+/commit/?id=374e76a1

I'm afraid there is no quick workaround for this, you need to write a function which builds a new store in the desired order.

affects: pygobject (Ubuntu) → gtk+3.0 (Ubuntu)
Changed in gtk+3.0 (Ubuntu):
status: New → Triaged
summary: - Missing feature blocks Python apps from being ported to GTK3.
+ gtk_list_store_reorder() is not introspectable
Revision history for this message
Jo-Erlend Schinstad (joerlend.schinstad-deactivatedaccount) wrote :

Are you serious? This means that all Python GTK applications that wants to use trees or lists will have to be rewritten? And this would have rather massive impact on large lists, wouldn't it?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.