diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-12-12 23:27:00 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-12-12 23:27:00 (GMT) |
commit | f89f72f53b42c704dcb5767e508747795f7115c6 (patch) | |
tree | 85be0588076f02b5546adac3424b201d68817e19 /plugins/pychrysa/gui | |
parent | dae8c208e24d03c7bf5314a86cb366a4e84a53c2 (diff) |
Allowed classes which derive from GObject to receive arguments in their constructor.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@302 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa/gui')
-rw-r--r-- | plugins/pychrysa/gui/panels/panel.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/pychrysa/gui/panels/panel.c b/plugins/pychrysa/gui/panels/panel.c index c35e9a0..b1bcc61 100644 --- a/plugins/pychrysa/gui/panels/panel.c +++ b/plugins/pychrysa/gui/panels/panel.c @@ -65,9 +65,7 @@ static PyObject *py_panel_item_new(PyTypeObject *type, PyObject *args, PyObject int ret; /* Bilan de lecture des args. */ GEditorItem *item; /* Version GLib du format */ - ret = PyArg_ParseTupleAndKeywords(args, kwds, "ssOs", - (char *[]) { "name", "lname", "widget", "path", NULL }, - &name, &lname, &widget, &path); + ret = PyArg_ParseTuple(args, "ssOs", &name, &lname, &widget, &path); if (!ret) return Py_None; item = g_panel_item_new(get_internal_ref(), name, lname, @@ -192,7 +190,8 @@ bool register_python_panel_item(PyObject *module) .tp_methods = py_panel_item_methods, .tp_getset = py_panel_item_getseters, - .tp_new = (newfunc)py_panel_item_new + .tp_new = (newfunc)py_panel_item_new, + .tp_init = (initproc)pychrysalide_allow_args_for_gobjects }; |