1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

api: add new function config_set_desc_plugin (task #10925)

This commit is contained in:
Sebastien Helleu
2011-04-26 17:47:49 +02:00
parent 51f836feb8
commit 3fd2af8184
27 changed files with 601 additions and 17 deletions
@@ -2759,6 +2759,41 @@ weechat_python_api_config_set_plugin (PyObject *self, PyObject *args)
PYTHON_RETURN_INT(rc);
}
/*
* 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, "" },