mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 23:06:38 +02:00
api: add functions completion_new, completion_search and completion_free (issue #1484)
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../gui/gui-color.h"
|
||||
#include "../gui/gui-completion.h"
|
||||
#include "../gui/gui-key.h"
|
||||
#include "../gui/gui-nicklist.h"
|
||||
#include "../gui/gui-window.h"
|
||||
@@ -849,6 +850,10 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
|
||||
new_plugin->command = &plugin_api_command;
|
||||
new_plugin->command_options = &plugin_api_command_options;
|
||||
|
||||
new_plugin->completion_new = &gui_completion_new;
|
||||
new_plugin->completion_search = &gui_completion_search;
|
||||
new_plugin->completion_free = &gui_completion_free;
|
||||
|
||||
new_plugin->network_pass_proxy = &network_pass_proxy;
|
||||
new_plugin->network_connect_to = &network_connect_to;
|
||||
|
||||
@@ -1133,6 +1138,9 @@ plugin_remove (struct t_weechat_plugin *plugin)
|
||||
struct t_weechat_plugin *new_weechat_plugins;
|
||||
struct t_gui_buffer *ptr_buffer, *next_buffer;
|
||||
|
||||
/* remove all completions (only those created by API) */
|
||||
gui_completion_free_all_plugin (plugin);
|
||||
|
||||
/* close buffers created by this plugin */
|
||||
ptr_buffer = gui_buffers;
|
||||
while (ptr_buffer)
|
||||
|
||||
Reference in New Issue
Block a user