diff options
Diffstat (limited to 'plugins/pychrysalide/gui/core/panels.c')
-rw-r--r-- | plugins/pychrysalide/gui/core/panels.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/plugins/pychrysalide/gui/core/panels.c b/plugins/pychrysalide/gui/core/panels.c index 3a3001c..a0bf853 100644 --- a/plugins/pychrysalide/gui/core/panels.c +++ b/plugins/pychrysalide/gui/core/panels.c @@ -39,7 +39,7 @@ /* Enregistre un panneau comme partie intégrante de l'éditeur. */ -static PyObject *py_panels_register_item(PyObject *, PyObject *); +static PyObject *py_panels_register_panel(PyObject *, PyObject *); @@ -56,12 +56,22 @@ static PyObject *py_panels_register_item(PyObject *, PyObject *); * * ******************************************************************************/ -static PyObject *py_panels_register_item(PyObject *self, PyObject *args) +static PyObject *py_panels_register_panel(PyObject *self, PyObject *args) { GPanelItem *item; /* Panneau à traiter */ GGenConfig *config; /* Configuration à consulter */ int ret; /* Bilan de lecture des args. */ +#define PANELS_REGISTER_PANEL_METHOD PYTHON_METHOD_DEF \ +( \ + register_panel, "panel", \ + METH_VARARGS, py_panels, \ + "Register a panel for the GUI." \ + "\n" \ + "The provided panel has to be a pychrysalide.gui.PanelItem" \ + " instance." \ +) + config = NULL; ret = PyArg_ParseTuple(args, "O&", convert_to_panel_item, &item); @@ -104,13 +114,8 @@ bool populate_gui_core_module_with_panels(void) PyObject *module; /* Module à recompléter */ static PyMethodDef py_panels_methods[] = { - - { "register_panel", py_panels_register_item, - METH_VARARGS, - "register_panel(item, config, /)\n--\n\nRegister a panel for the GUI." - }, + PANELS_REGISTER_PANEL_METHOD, { NULL } - }; module = get_access_to_python_module("pychrysalide.gui.core"); |