[pygtk] inconsistency in treeview dnd behaviour in a certain case

Doug Quale quale1 at charter.net
Tue Aug 3 01:39:51 WST 2004


John Finlay <finlay at moeraki.com> writes:

> GTK+ returns FALSE from the underlying
> gtk_tree_view_get_dest_row_at_pos() call in this circumstance. PyGTK
> turns this into a None since no other information is available.
> For get_drag_dest_row() the return value from GTK+ is a NULL path
> which is translated into a None return value. Again no other
> information is  available.

John modestly doesn't mention that the treeview drag and drop example
he wrote for his pygtk tutorial handles this subtlety correctly.  When
gtk_tree_view_get_dest_row_at_pos() returns None one sensible thing to
do is to append the dropped row to the end of the store.  You can find
his example here:

http://www.pygtk.org/pygtk2tutorial/sec-TreeViewDragAndDrop.html#sec-TreeViewDnDExample


More information about the pygtk mailing list