From 697f070725bc62e4d156e3aabb5a2be93cd685e6 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 16 Jan 2008 10:19:25 +0100 Subject: Added new functions and script name completion in script plugins, fixed some bugs in weelist management and script plugins New functions in script plugins API: gettext, ngettext, list_new, list_add, list_search, list_casesearch, list_get, list_set, list_next, list_prev, list_string, list_size, list_remove, list_remove_all, list_free. --- src/plugins/scripts/python/weechat-python.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/plugins/scripts/python/weechat-python.c') diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index bbf01dd09..045a10ec5 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -565,6 +565,25 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_OK; } +/* + * weechat_python_completion_cb: callback for script completion + */ + +int +weechat_python_completion_cb (void *data, char *completion, + struct t_gui_buffer *buffer, + struct t_weelist *list) +{ + /* make C compiler happy */ + (void) data; + (void) completion; + (void) buffer; + + script_completion (weechat_python_plugin, list, python_scripts); + + return WEECHAT_RC_OK; +} + /* * weechat_python_dump_data_cb: dump Python plugin data in WeeChat log file */ @@ -621,7 +640,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) } script_init (weechat_python_plugin, - &weechat_python_command_cb, &weechat_python_dump_data_cb, + &weechat_python_command_cb, + &weechat_python_completion_cb, + &weechat_python_dump_data_cb, &weechat_python_load_cb); /* init ok */ -- cgit v1.2.3