GNOME Bugzilla – Bug 730740
When defining a ListStore subclass, in Python, with a do_drag_data_get method, that method is called for all the ListStores
Last modified: 2014-05-30 04:28:14 UTC
Created attachment 277164 [details] app illustrating the problem Create a class CustomStore(Gtk.ListStore) with a do_drag_data_get method. Notice that the method is called for all the Gtk.ListStore instances. It should be called only for the CustomStore instances. See the attached app, drag and drop a row in the same treeview and notice in the console that the method is called even though it should not be called.
This is probably a bug in pygobject. At a cursory glance, the Python vfunc is obviously clobbering the Gtk.ListStores implementation of the vfunc slot. We probably need to add more restrictions as to how vfunc implementations are resolved. As a workaround, specifying the Gtk.TreeDragSource interface as a base seems to fix the problem: class CustomStore(Gtk.ListStore, Gtk.TreeDragSource): ... Although sub-classing Gtk.ListStore seems a bit strange to me in general...
Turns out this is a dup of a very old bug. *** This bug has been marked as a duplicate of bug 566571 ***