diff options
Diffstat (limited to 'plugins/pychrysa/gui/panels/log.c')
-rw-r--r-- | plugins/pychrysa/gui/panels/log.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/pychrysa/gui/panels/log.c b/plugins/pychrysa/gui/panels/log.c index ba68fe9..fcf5ac5 100644 --- a/plugins/pychrysa/gui/panels/log.c +++ b/plugins/pychrysa/gui/panels/log.c @@ -183,28 +183,18 @@ PyTypeObject *get_python_log_panel_type(void) bool register_python_log_panel(PyObject *module) { PyTypeObject *py_log_panel_type; /* Type Python 'LoadedBinary' */ - int ret; /* Bilan d'un appel */ PyObject *dict; /* Dictionnaire du module */ py_log_panel_type = get_python_log_panel_type(); - py_log_panel_type->tp_base = get_python_panel_item_type(); - py_log_panel_type->tp_basicsize = py_log_panel_type->tp_base->tp_basicsize; + dict = PyModule_GetDict(module); - if (PyType_Ready(py_log_panel_type) != 0) + if (!register_class_for_pygobject(dict, G_TYPE_LOG_PANEL, py_log_panel_type, get_python_panel_item_type())) return false; if (!define_python_log_constants(py_log_panel_type)) return false; - Py_INCREF(py_log_panel_type); - ret = PyModule_AddObject(module, "LogPanel", (PyObject *)py_log_panel_type); - if (ret != 0) return false; - - dict = PyModule_GetDict(module); - pygobject_register_class(dict, "LogPanel", G_TYPE_LOG_PANEL, py_log_panel_type, - Py_BuildValue("(O)", py_log_panel_type->tp_base)); - return true; } |