summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-04-26 17:47:49 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-04-26 17:47:49 +0200
commit3fd2af81847440fa221621572d6cf36eca910483 (patch)
treee97824372bd150213f3cbf8c22513f5bd209722a /src/plugins/scripts/python
parent51f836feb81e8021dda0b67d4efcd56d635f8f5d (diff)
downloadweechat-3fd2af81847440fa221621572d6cf36eca910483.zip
api: add new function config_set_desc_plugin (task #10925)
Diffstat (limited to 'src/plugins/scripts/python')
-rw-r--r--src/plugins/scripts/python/weechat-python-api.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c
index 9a3924fc4..daf7d8b75 100644
--- a/src/plugins/scripts/python/weechat-python-api.c
+++ b/src/plugins/scripts/python/weechat-python-api.c
@@ -2760,6 +2760,41 @@ weechat_python_api_config_set_plugin (PyObject *self, PyObject *args)
}
/*
+ * weechat_python_api_config_set_desc_plugin: set description of a plugin option
+ */
+
+static PyObject *
+weechat_python_api_config_set_desc_plugin (PyObject *self, PyObject *args)
+{
+ char *option, *description;
+
+ /* make C compiler happy */
+ (void) self;
+
+ if (!python_current_script || !python_current_script->name)
+ {
+ WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "config_set_desc_plugin");
+ PYTHON_RETURN_ERROR;
+ }
+
+ option = NULL;
+ description = NULL;
+
+ if (!PyArg_ParseTuple (args, "ss", &option, &description))
+ {
+ WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "config_set_desc_plugin");
+ PYTHON_RETURN_ERROR;
+ }
+
+ script_api_config_set_desc_plugin (weechat_python_plugin,
+ python_current_script,
+ option,
+ description);
+
+ PYTHON_RETURN_OK;
+}
+
+/*
* weechat_python_api_config_unset_plugin: unset plugin option
*/
@@ -7066,6 +7101,7 @@ PyMethodDef weechat_python_funcs[] =
{ "config_get_plugin", &weechat_python_api_config_get_plugin, METH_VARARGS, "" },
{ "config_is_set_plugin", &weechat_python_api_config_is_set_plugin, METH_VARARGS, "" },
{ "config_set_plugin", &weechat_python_api_config_set_plugin, METH_VARARGS, "" },
+ { "config_set_desc_plugin", &weechat_python_api_config_set_desc_plugin, METH_VARARGS, "" },
{ "config_unset_plugin", &weechat_python_api_config_unset_plugin, METH_VARARGS, "" },
{ "prefix", &weechat_python_api_prefix, METH_VARARGS, "" },
{ "color", &weechat_python_api_color, METH_VARARGS, "" },