summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.override
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2006-04-04 14:51:13 +0000
committerJohan Dahlin <johan@src.gnome.org>2006-04-04 14:51:13 +0000
commitcbda84493e527e538600835b2aaddc2a9296ec3f (patch)
treee88f642268053156d883668ddaf42e2abed28e7c /gtk/gtktreeview.override
parent924aedd963d48d6a5b182b5bc6a78d725eee8b67 (diff)
downloadpygtk-cbda84493e527e538600835b2aaddc2a9296ec3f.tar.gz
reviewed by: Johan Dahlin <jdahlin@async.com.br>
* gtk/gtktreeview.override: Make sure gtk.TreeView.cell_get_size() allows the usage of the in argument.
Diffstat (limited to 'gtk/gtktreeview.override')
-rw-r--r--gtk/gtktreeview.override22
1 files changed, 17 insertions, 5 deletions
diff --git a/gtk/gtktreeview.override b/gtk/gtktreeview.override
index 23876e0c..a1496562 100644
--- a/gtk/gtktreeview.override
+++ b/gtk/gtktreeview.override
@@ -119,15 +119,27 @@ _wrap_gtk_tree_view_column_new(PyGObject *self, PyObject*args, PyObject*kwargs)
return 0;
}
%%
-override gtk_tree_view_column_cell_get_size noargs
+override gtk_tree_view_column_cell_get_size kwargs
static PyObject *
-_wrap_gtk_tree_view_column_cell_get_size(PyGObject *self)
+_wrap_gtk_tree_view_column_cell_get_size(PyGObject *self, PyObject *args, PyObject *kwargs)
{
- GdkRectangle cell_area;
- gint x_offset, y_offset, width, height;
+ static char *kwlist[] = { "cell_area", NULL };
+ PyObject *py_cell_area = Py_None;
+ GdkRectangle cell_area = { 0, 0, 0, 0};
+ gint x_offset = 0, y_offset = 0, width, height;
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:GtkTreeViewColumn.cell_get_size",
+ kwlist, &py_cell_area))
+ return NULL;
+
+ if (py_cell_area != Py_None) {
+ if (!pygdk_rectangle_from_pyobject(py_cell_area, &cell_area))
+ return NULL;
+ }
+
gtk_tree_view_column_cell_get_size(GTK_TREE_VIEW_COLUMN(self->obj),
- &cell_area,
+ (py_cell_area == Py_None) ? NULL : &cell_area,
&x_offset, &y_offset, &width, &height);
return Py_BuildValue("(Niiii)",