diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2010-12-24 10:09:43 +1300 |
---|---|---|
committer | John Stowers <john.stowers@gmail.com> | 2010-12-24 10:09:43 +1300 |
commit | 8122275fc42eafc12d90b5c829f1708f50da27fb (patch) | |
tree | 0e91d438c4c348597a956be8b93f4848662ba588 /gtk | |
parent | c5f0622b20c56988d369083cb822ab492269d6f9 (diff) | |
download | pygtk-8122275fc42eafc12d90b5c829f1708f50da27fb.tar.gz |
Fix GtkTreeView.set_drag_dest_row
* Accept None as first argument
* Add examples/gtk/treeview_dnd.py
* Fixes bug 637214
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtktreeview.override | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk/gtktreeview.override b/gtk/gtktreeview.override index 82e6f3c3..62fec01e 100644 --- a/gtk/gtktreeview.override +++ b/gtk/gtktreeview.override @@ -2774,11 +2774,15 @@ _wrap_gtk_tree_view_set_drag_dest_row(PyGObject *self, PyObject *args, &py_path, &py_pos)) return NULL; - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, - "set_drag_dest_row muts be a TreePath"); - return NULL; + if (py_path == Py_None) + path = NULL; + else { + path = pygtk_tree_path_from_pyobject(py_path); + if (!path) { + PyErr_SetString(PyExc_TypeError, + "set_drag_dest_row must be a TreePath"); + return NULL; + } } pos = (GtkTreeViewDropPosition) py_pos; gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW(self->obj), path, pos); |