Mercurial > pidgin
annotate finch/libgnt/pygnt/gntbox.override @ 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 | |
children | 44b4e8bd759b |
rev | line source |
---|---|
18721
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 /** |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 * pygnt- Python bindings for the GNT toolkit. |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2007 Sadrul Habib Chowdhury <sadrul@pidgin.im> |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 * |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 * gntbox.override: overrides for the box widget. |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 * |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 * This library is free software; you can redistribute it and/or |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 * License as published by the Free Software Foundation; either |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 * |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 * This library is distributed in the hope that it will be useful, |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 * Lesser General Public License for more details. |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 * |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 * License along with this library; if not, write to the Free Software |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 * USA |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 */ |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 %% |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 override gnt_box_add_widget kwargs |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 static PyObject * |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 _wrap_gnt_box_add_widget(PyGObject *self, PyObject *args, PyObject *kwargs) |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
26 { |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 static char *kwlist[] = { "widget", NULL }; |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 PyGObject *widget; |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
30 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GntBox.add_widget", kwlist, &PyGntWidget_Type, &widget)) |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
31 return NULL; |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
32 |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
33 gnt_box_add_widget(GNT_BOX(self->obj), GNT_WIDGET(widget->obj)); |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 Py_INCREF(widget); |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
35 |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 Py_INCREF(Py_None); |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
37 return Py_None; |
7389b597a812
This gets rid of more weird crashes.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
38 } |