diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-22 18:11:33 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-22 18:11:33 +0200 |
commit | 06fd80e21079f80e7ff61537de42431205bd911a (patch) | |
tree | 53a29b06c89ed0772c88b6458f7cb113f2268d5b /src/plugins/scripts/lua | |
parent | 9d49beabf1fe1a6e9347afe6a25db4744df28abe (diff) | |
download | weechat-06fd80e21079f80e7ff61537de42431205bd911a.zip |
Added conditions for bar display and bar max size
Diffstat (limited to 'src/plugins/scripts/lua')
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 2cf5a3ee0..e720da46e 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -3878,7 +3878,8 @@ weechat_lua_api_bar_search (lua_State *L) static int weechat_lua_api_bar_new (lua_State *L) { - const char *name, *type, *position, *items, *size, *separator; + const char *name, *type, *conditions, *position, *size, *size_max; + const char *separator, *items; char *result; int n; @@ -3893,30 +3894,36 @@ weechat_lua_api_bar_new (lua_State *L) name = NULL; type = NULL; + conditions = NULL; position = NULL; size = NULL; + size_max = NULL; separator = NULL; items = NULL; n = lua_gettop (lua_current_interpreter); - if (n < 6) + if (n < 8) { WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("bar_new"); LUA_RETURN_EMPTY; } - name = lua_tostring (lua_current_interpreter, -6); - type = lua_tostring (lua_current_interpreter, -5); - position = lua_tostring (lua_current_interpreter, -4); - size = lua_tostring (lua_current_interpreter, -3); + name = lua_tostring (lua_current_interpreter, -8); + type = lua_tostring (lua_current_interpreter, -7); + conditions = lua_tostring (lua_current_interpreter, -6); + position = lua_tostring (lua_current_interpreter, -5); + size = lua_tostring (lua_current_interpreter, -4); + size_max = lua_tostring (lua_current_interpreter, -3); separator = lua_tostring (lua_current_interpreter, -2); items = lua_tostring (lua_current_interpreter, -1); result = script_ptr2str (weechat_bar_new ((char *)name, (char *)type, + (char *)conditions, (char *)position, (char *)size, + (char *)size_max, (char *)separator, (char *)items)); |