mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 14:56:39 +02:00
Add delimiter color for bars, fix some bugs with bars
This commit is contained in:
@@ -4096,11 +4096,12 @@ static VALUE
|
||||
weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE priority, VALUE type,
|
||||
VALUE conditions, VALUE position, VALUE filling,
|
||||
VALUE size, VALUE size_max, VALUE color_fg,
|
||||
VALUE color_bg, VALUE separator, VALUE items)
|
||||
VALUE color_delim, VALUE color_bg, VALUE separator,
|
||||
VALUE items)
|
||||
{
|
||||
char *c_name, *c_priority, *c_type, *c_conditions, *c_position, *c_filling;
|
||||
char *c_size, *c_size_max, *c_color_fg, *c_color_bg, *c_separator;
|
||||
char *c_items;
|
||||
char *c_size, *c_size_max, *c_color_fg, *c_color_delim, *c_color_bg;
|
||||
char *c_separator, *c_items;
|
||||
char *result;
|
||||
VALUE return_value;
|
||||
|
||||
@@ -4122,14 +4123,15 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE priority, VALUE type,
|
||||
c_size = NULL;
|
||||
c_size_max = NULL;
|
||||
c_color_fg = NULL;
|
||||
c_color_delim = NULL;
|
||||
c_color_bg = NULL;
|
||||
c_separator = NULL;
|
||||
c_items = NULL;
|
||||
|
||||
if (NIL_P (name) || NIL_P (priority) || NIL_P (type) || NIL_P (conditions)
|
||||
|| NIL_P (position) || NIL_P (filling) || NIL_P (size)
|
||||
|| NIL_P (size_max) || NIL_P (color_fg) || NIL_P (color_bg)
|
||||
|| NIL_P (separator) || NIL_P (items))
|
||||
|| NIL_P (size_max) || NIL_P (color_fg) || NIL_P (color_delim)
|
||||
|| NIL_P (color_bg) || NIL_P (separator) || NIL_P (items))
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("bar_new");
|
||||
RUBY_RETURN_EMPTY;
|
||||
@@ -4144,6 +4146,7 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE priority, VALUE type,
|
||||
Check_Type (size, T_STRING);
|
||||
Check_Type (size_max, T_STRING);
|
||||
Check_Type (color_fg, T_STRING);
|
||||
Check_Type (color_delim, T_STRING);
|
||||
Check_Type (color_bg, T_STRING);
|
||||
Check_Type (separator, T_STRING);
|
||||
Check_Type (items, T_STRING);
|
||||
@@ -4157,6 +4160,7 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE priority, VALUE type,
|
||||
c_size = STR2CSTR (size);
|
||||
c_size_max = STR2CSTR (size_max);
|
||||
c_color_fg = STR2CSTR (color_fg);
|
||||
c_color_delim = STR2CSTR (color_delim);
|
||||
c_color_bg = STR2CSTR (color_bg);
|
||||
c_separator = STR2CSTR (separator);
|
||||
c_items = STR2CSTR (items);
|
||||
@@ -4170,6 +4174,7 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE priority, VALUE type,
|
||||
c_size,
|
||||
c_size_max,
|
||||
c_color_fg,
|
||||
c_color_delim,
|
||||
c_color_bg,
|
||||
c_separator,
|
||||
c_items));
|
||||
@@ -4793,7 +4798,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
|
||||
rb_define_module_function (ruby_mWeechat, "bar_item_update", &weechat_ruby_api_bar_item_update, 1);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_item_remove", &weechat_ruby_api_bar_item_remove, 1);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_search", &weechat_ruby_api_bar_search, 1);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_new", &weechat_ruby_api_bar_new, 12);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_new", &weechat_ruby_api_bar_new, 13);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_set", &weechat_ruby_api_bar_set, 3);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_update", &weechat_ruby_api_bar_update, 1);
|
||||
rb_define_module_function (ruby_mWeechat, "bar_remove", &weechat_ruby_api_bar_remove, 1);
|
||||
|
||||
Reference in New Issue
Block a user