mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 12:56:37 +02:00
Remove obsolete arguments in bar item callback, in script plugins
This commit is contained in:
@@ -4678,23 +4678,16 @@ weechat_lua_api_bar_item_search (lua_State *L)
|
||||
|
||||
char *
|
||||
weechat_lua_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width, int max_height)
|
||||
struct t_gui_window *window)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *lua_argv[5], *ret;
|
||||
static char str_width[32], str_height[32];
|
||||
char *lua_argv[3], *ret;
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
snprintf (str_width, sizeof (str_width), "%d", max_width);
|
||||
snprintf (str_height, sizeof (str_height), "%d", max_height);
|
||||
|
||||
lua_argv[0] = script_ptr2str (item);
|
||||
lua_argv[1] = script_ptr2str (window);
|
||||
lua_argv[2] = str_width;
|
||||
lua_argv[3] = str_height;
|
||||
lua_argv[4] = NULL;
|
||||
lua_argv[2] = NULL;
|
||||
|
||||
ret = (char *)weechat_lua_exec (script_callback->script,
|
||||
WEECHAT_SCRIPT_EXEC_STRING,
|
||||
|
||||
@@ -3929,23 +3929,16 @@ static XS (XS_weechat_api_bar_item_search)
|
||||
|
||||
char *
|
||||
weechat_perl_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width, int max_height)
|
||||
struct t_gui_window *window)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[5], *ret;
|
||||
static char str_width[32], str_height[32];
|
||||
char *perl_argv[3], *ret;
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
snprintf (str_width, sizeof (str_width), "%d", max_width);
|
||||
snprintf (str_height, sizeof (str_height), "%d", max_height);
|
||||
|
||||
perl_argv[0] = script_ptr2str (item);
|
||||
perl_argv[1] = script_ptr2str (window);
|
||||
perl_argv[2] = str_width;
|
||||
perl_argv[3] = str_height;
|
||||
perl_argv[4] = NULL;
|
||||
perl_argv[2] = NULL;
|
||||
|
||||
ret = (char *)weechat_perl_exec (script_callback->script,
|
||||
WEECHAT_SCRIPT_EXEC_STRING,
|
||||
|
||||
@@ -4173,23 +4173,16 @@ weechat_python_api_bar_item_search (PyObject *self, PyObject *args)
|
||||
|
||||
char *
|
||||
weechat_python_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width, int max_height)
|
||||
struct t_gui_window *window)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[5], *ret;
|
||||
static char str_width[32], str_height[32];
|
||||
char *python_argv[3], *ret;
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
snprintf (str_width, sizeof (str_width), "%d", max_width);
|
||||
snprintf (str_height, sizeof (str_height), "%d", max_height);
|
||||
|
||||
python_argv[0] = script_ptr2str (item);
|
||||
python_argv[1] = script_ptr2str (window);
|
||||
python_argv[2] = str_width;
|
||||
python_argv[3] = str_height;
|
||||
python_argv[4] = NULL;
|
||||
python_argv[2] = NULL;
|
||||
|
||||
ret = (char *)weechat_python_exec (script_callback->script,
|
||||
WEECHAT_SCRIPT_EXEC_STRING,
|
||||
|
||||
@@ -4779,23 +4779,16 @@ weechat_ruby_api_bar_item_search (VALUE class, VALUE name)
|
||||
|
||||
char *
|
||||
weechat_ruby_api_bar_item_build_cb (void *data, struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width, int max_height)
|
||||
struct t_gui_window *window)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[5], *ret;
|
||||
static char str_width[32], str_height[32];
|
||||
char *ruby_argv[3], *ret;
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
snprintf (str_width, sizeof (str_width), "%d", max_width);
|
||||
snprintf (str_height, sizeof (str_height), "%d", max_height);
|
||||
|
||||
ruby_argv[0] = script_ptr2str (item);
|
||||
ruby_argv[1] = script_ptr2str (window);
|
||||
ruby_argv[2] = str_width;
|
||||
ruby_argv[3] = str_height;
|
||||
ruby_argv[4] = NULL;
|
||||
ruby_argv[2] = NULL;
|
||||
|
||||
ret = (char *)weechat_ruby_exec (script_callback->script,
|
||||
WEECHAT_SCRIPT_EXEC_STRING,
|
||||
|
||||
@@ -219,9 +219,7 @@ extern struct t_gui_bar_item *script_api_bar_item_new (struct t_weechat_plugin *
|
||||
const char *name,
|
||||
char *(*build_callback)(void *data,
|
||||
struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width,
|
||||
int max_height),
|
||||
struct t_gui_window *window),
|
||||
const char *function_build);
|
||||
extern void script_api_bar_item_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
|
||||
Reference in New Issue
Block a user