diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-03-07 10:54:33 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-03-07 10:54:33 +0100 |
commit | 519f62c11d4c22f4544588a7f8f1ee7acc6a4a7c (patch) | |
tree | 459ebd9095079f6fc12b7dd10c6ee93ed6aa6f24 /src/plugins/scripts/lua/weechat-lua-api.c | |
parent | 32e976ae72442b8ce36098c2b9d85a47db5cfda2 (diff) | |
download | weechat-519f62c11d4c22f4544588a7f8f1ee7acc6a4a7c.zip |
Added "max_height" parameter for bar item rebuild callbacks
Diffstat (limited to 'src/plugins/scripts/lua/weechat-lua-api.c')
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 58d390092..f996c847c 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -3412,20 +3412,22 @@ 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_width, int max_height) { struct t_script_callback *script_callback; - char *lua_argv[4], *ret; - static char buf[32]; + char *lua_argv[5], *ret; + static char str_width[32], str_height[32]; script_callback = (struct t_script_callback *)data; - snprintf (buf, sizeof (buf) - 1, "%d", max_width); + 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] = buf; - lua_argv[3] = NULL; + lua_argv[2] = str_width; + lua_argv[3] = str_height; + lua_argv[4] = NULL; ret = (char *)weechat_lua_exec (script_callback->script, WEECHAT_SCRIPT_EXEC_STRING, |