diff options
Diffstat (limited to 'plugins/pychrysalide/plugin.c')
-rw-r--r-- | plugins/pychrysalide/plugin.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins/pychrysalide/plugin.c b/plugins/pychrysalide/plugin.c index b3bcce5..0fd6c26 100644 --- a/plugins/pychrysalide/plugin.c +++ b/plugins/pychrysalide/plugin.c @@ -58,7 +58,7 @@ static void py_plugin_module_init_gclass(GPluginModuleClass *, gpointer); static int py_plugin_module_init(PyObject *self, PyObject *args, PyObject *kwds); /* Accompagne la fin du chargement des modules natifs. */ -static void py_plugin_module_notify_native_loaded_wrapper(GPluginModule *, PluginAction); +static void py_plugin_module_notify_plugins_loaded_wrapper(GPluginModule *, PluginAction); /* Complète une liste de resources pour thème. */ static void py_plugin_module_include_theme_wrapper(const GPluginModule *, PluginAction, gboolean, char ***, size_t *); @@ -231,7 +231,7 @@ static void py_plugin_module_init_gclass(GPluginModuleClass *class, gpointer unu class->init = NULL; class->exit = NULL; - class->native_loaded = py_plugin_module_notify_native_loaded_wrapper; + class->plugins_loaded = py_plugin_module_notify_plugins_loaded_wrapper; class->include_theme = py_plugin_module_include_theme_wrapper; class->notify_panel = py_plugin_module_notify_panel_creation_wrapper; @@ -293,7 +293,7 @@ static int py_plugin_module_init(PyObject *self, PyObject *args, PyObject *kwds) "\n" \ "Depending on the implemented actions, some of the following methods" \ " have to be defined for new classes:\n" \ - "* pychrysalide.PluginModule._notify_native_loaded();\n" \ + "* pychrysalide.PluginModule._notify_plugins_loaded();\n" \ "* pychrysalide.PluginModule._include_theme();\n" \ "* pychrysalide.PluginModule._on_panel_creation;\n" \ "* pychrysalide.PluginModule._on_panel_docking();\n" \ @@ -394,37 +394,38 @@ static int py_plugin_module_init(PyObject *self, PyObject *args, PyObject *kwds) * * ******************************************************************************/ -static void py_plugin_module_notify_native_loaded_wrapper(GPluginModule *plugin, PluginAction action) +static void py_plugin_module_notify_plugins_loaded_wrapper(GPluginModule *plugin, PluginAction action) { PyGILState_STATE gstate; /* Sauvegarde d'environnement */ PyObject *pyobj; /* Objet Python concerné */ PyObject *args; /* Arguments pour l'appel */ PyObject *pyret; /* Bilan d'exécution */ -#define PLUGIN_MODULE_NOTIFY_NATIVE_LOADED_WRAPPER PYTHON_WRAPPER_DEF \ +#define PLUGIN_MODULE_NOTIFY_PLUGINS_LOADED_WRAPPER PYTHON_WRAPPER_DEF \ ( \ - _notify_native_loaded, "$self, action, /", \ + _notify_plugins_loaded, "$self, action, /", \ METH_VARARGS, \ - "Abstract method called once all the native plugins are loaded.\n" \ + "Abstract method called once all the (native?) plugins are" \ + " loaded.\n" \ "\n" \ "The expected action is a pychrysalide.PluginModule.PluginAction" \ " value.\n" \ "\n" \ - "This method has to be defined in order to handle action such as" \ - " *NATIVE_LOADED*." \ + "This method has to be defined in order to handle actions such as" \ + " *NATIVE_PLUGINS_LOADED* or *PLUGINS_LOADED*." \ ) gstate = PyGILState_Ensure(); pyobj = pygobject_new(G_OBJECT(plugin)); - if (has_python_method(pyobj, "_notify_native_loaded")) + if (has_python_method(pyobj, "_notify_plugins_loaded")) { args = PyTuple_New(1); PyTuple_SetItem(args, 0, PyLong_FromUnsignedLong(action)); - pyret = run_python_method(pyobj, "_notify_native_loaded", args); + pyret = run_python_method(pyobj, "_notify_plugins_loaded", args); Py_XDECREF(pyret); Py_DECREF(args); @@ -1629,7 +1630,7 @@ static PyObject *py_plugin_module_get_filename(PyObject *self, void *closure) PyTypeObject *get_python_plugin_module_type(void) { static PyMethodDef py_plugin_module_methods[] = { - PLUGIN_MODULE_NOTIFY_NATIVE_LOADED_WRAPPER, + PLUGIN_MODULE_NOTIFY_PLUGINS_LOADED_WRAPPER, PLUGIN_MODULE_INCLUDE_THEME_WRAPPER, PLUGIN_MODULE_ON_PANEL_CREATION_WRAPPER, PLUGIN_MODULE_ON_PANEL_DOCKING_WRAPPER, |