changeset 18721:7389b597a812

This gets rid of more weird crashes.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 29 Jul 2007 18:59:46 +0000
parents a69ab280147b
children 8b5082d54c1d
files finch/libgnt/pygnt/Makefile.am finch/libgnt/pygnt/gnt.override finch/libgnt/pygnt/gntbox.override
diffstat 3 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/pygnt/Makefile.am	Sun Jul 29 18:41:28 2007 +0000
+++ b/finch/libgnt/pygnt/Makefile.am	Sun Jul 29 18:59:46 2007 +0000
@@ -7,6 +7,7 @@
 sources = \
 	gnt.def \
 	gnt.override \
+	gntbox.override \
 	gntfilesel.override \
 	gnttree.override
 
--- a/finch/libgnt/pygnt/gnt.override	Sun Jul 29 18:41:28 2007 +0000
+++ b/finch/libgnt/pygnt/gnt.override	Sun Jul 29 18:59:46 2007 +0000
@@ -29,6 +29,7 @@
 #include "common.h"
 %%
 include
+ gntbox.override
  gntfilesel.override
  gnttree.override
 %%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/finch/libgnt/pygnt/gntbox.override	Sun Jul 29 18:59:46 2007 +0000
@@ -0,0 +1,38 @@
+/**
+ * pygnt- Python bindings for the GNT toolkit.
+ * Copyright (C) 2007 Sadrul Habib Chowdhury <sadrul@pidgin.im>
+ *
+ *   gntbox.override: overrides for the box widget.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+%%
+override gnt_box_add_widget kwargs
+static PyObject *
+_wrap_gnt_box_add_widget(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "widget", NULL };
+    PyGObject *widget;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GntBox.add_widget", kwlist, &PyGntWidget_Type, &widget))
+        return NULL;
+    
+    gnt_box_add_widget(GNT_BOX(self->obj), GNT_WIDGET(widget->obj));
+	Py_INCREF(widget);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}