From 82225d46b0e335c1fe0d6cb0e82a1b410ee14652 Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Sun, 24 Nov 2002 14:49:21 +0000 Subject: allow you to get a row object from a TreeIter as model[iter]. 2002-11-24 James Henstridge * gtk/gtk.override (_wrap_gtk_tree_model_tp_getitem): allow you to get a row object from a TreeIter as model[iter]. * gtk/gtk-types.c (pygtk_tree_model_row_get_iter): allow getting an iter from a treemodel row object. --- gtk/gtk.override | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gtk/gtk.override') diff --git a/gtk/gtk.override b/gtk/gtk.override index 54ebaaa6..02b3ab48 100644 --- a/gtk/gtk.override +++ b/gtk/gtk.override @@ -1819,6 +1819,11 @@ _wrap_gtk_tree_model_tp_getitem(PyGObject *self, PyObject *item) GtkTreeIter iter; PyObject *ret = NULL; + if (pyg_boxed_check(item, GTK_TYPE_TREE_ITER)) { + return _pygtk_tree_model_row_new(GTK_TREE_MODEL(self->obj), + pyg_boxed_get(item, GtkTreeIter)); + } + path = pygtk_tree_path_from_pyobject(item); if (!path) { PyErr_SetString(PyExc_TypeError, -- cgit v1.2.1