mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 16:23:14 +02:00
core: add bar option "color_bg_inactive" (issue #732)
This commit is contained in:
+19
-7
@@ -137,10 +137,11 @@ command_bar_list (int full)
|
||||
_("height") : _("width"),
|
||||
(CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE]) == 0) ? _("auto") : str_size);
|
||||
gui_chat_printf (NULL,
|
||||
_(" priority: %d, fg: %s, bg: %s, items: %s%s"),
|
||||
_(" priority: %d, fg: %s, bg: %s, bg_inactive: %s, items: %s%s"),
|
||||
CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_PRIORITY]),
|
||||
gui_color_get_name (CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_FG])),
|
||||
gui_color_get_name (CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_BG])),
|
||||
gui_color_get_name (CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE])),
|
||||
(CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_ITEMS])
|
||||
&& CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_ITEMS])[0]) ?
|
||||
CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_ITEMS]) : "-",
|
||||
@@ -275,12 +276,23 @@ COMMAND_CALLBACK(bar)
|
||||
if (error && !error[0])
|
||||
{
|
||||
/* create bar */
|
||||
if (gui_bar_new (argv[2], "0", "0", str_type,
|
||||
(pos_condition) ? pos_condition : "",
|
||||
argv[4],
|
||||
"horizontal", "vertical",
|
||||
argv[5], "0", "default", "default", "default",
|
||||
argv[6], argv_eol[7]))
|
||||
if (gui_bar_new (
|
||||
argv[2], /* nane */
|
||||
"0", /* hidden */
|
||||
"0", /* priority */
|
||||
str_type, /* type */
|
||||
(pos_condition) ? pos_condition : "", /* conditions */
|
||||
argv[4], /* position */
|
||||
"horizontal", /* filling_top_bottom */
|
||||
"vertical", /* filling_left_right */
|
||||
argv[5], /* size */
|
||||
"0", /* size_max */
|
||||
"default", /* color fg */
|
||||
"default", /* color delim */
|
||||
"default", /* color bg */
|
||||
"default", /* color bg inactive */
|
||||
argv[6], /* separators */
|
||||
argv_eol[7])) /* items */
|
||||
{
|
||||
gui_chat_printf (NULL, _("Bar \"%s\" created"),
|
||||
argv[2]);
|
||||
|
||||
@@ -164,6 +164,7 @@ gui_bar_window_create_win (struct t_gui_bar_window *bar_window)
|
||||
|
||||
int
|
||||
gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
struct t_gui_window *window,
|
||||
enum t_gui_bar_filling filling,
|
||||
int *x, int *y,
|
||||
const char *string,
|
||||
@@ -171,7 +172,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
int hide_chars_if_scrolling,
|
||||
int *index_item, int *index_subitem, int *index_line)
|
||||
{
|
||||
int x_with_hidden, size_on_screen, low_char, hidden;
|
||||
int x_with_hidden, size_on_screen, low_char, hidden, color_bg;
|
||||
char utf_char[16], *next_char, *output;
|
||||
|
||||
if (!bar_window || !string || !string[0])
|
||||
@@ -179,11 +180,15 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
|
||||
wmove (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, *y, *x);
|
||||
|
||||
color_bg = ((CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_TYPE]) != GUI_BAR_TYPE_ROOT)
|
||||
&& (window != gui_current_window)) ?
|
||||
GUI_BAR_OPTION_COLOR_BG_INACTIVE : GUI_BAR_OPTION_COLOR_BG;
|
||||
|
||||
if (reset_color_before_display)
|
||||
{
|
||||
gui_window_set_custom_color_fg_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]),
|
||||
1);
|
||||
}
|
||||
|
||||
@@ -242,7 +247,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
/* bar background */
|
||||
string += 2;
|
||||
gui_window_set_custom_color_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]));
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]));
|
||||
break;
|
||||
case GUI_COLOR_BAR_START_INPUT_CHAR:
|
||||
string += 2;
|
||||
@@ -304,7 +309,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
string++;
|
||||
gui_window_set_custom_color_fg_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]),
|
||||
0);
|
||||
break;
|
||||
default:
|
||||
@@ -329,7 +334,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
A_ALL_ATTR);
|
||||
gui_window_set_custom_color_fg_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]),
|
||||
1);
|
||||
break;
|
||||
default:
|
||||
@@ -409,7 +414,7 @@ void
|
||||
gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
struct t_gui_window *window)
|
||||
{
|
||||
int x, y, items_count, num_lines, line;
|
||||
int x, y, items_count, num_lines, line, color_bg;
|
||||
enum t_gui_bar_filling filling;
|
||||
char *content, **items;
|
||||
static char str_start_input[16] = { '\0' };
|
||||
@@ -434,6 +439,10 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
if (!bar_window || (bar_window->x < 0) || (bar_window->y < 0))
|
||||
return;
|
||||
|
||||
color_bg = ((CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_TYPE]) != GUI_BAR_TYPE_ROOT)
|
||||
&& (window != gui_current_window)) ?
|
||||
GUI_BAR_OPTION_COLOR_BG_INACTIVE : GUI_BAR_OPTION_COLOR_BG;
|
||||
|
||||
if (!str_start_input[0])
|
||||
{
|
||||
snprintf (str_start_input, sizeof (str_start_input), "%c%c%c",
|
||||
@@ -497,7 +506,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
gui_bar_window_set_current_size (bar_window, window, 1);
|
||||
gui_window_clear (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]));
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -552,7 +561,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
|
||||
gui_window_clear (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]));
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]));
|
||||
x = 0;
|
||||
y = 0;
|
||||
some_data_not_displayed = 0;
|
||||
@@ -645,7 +654,9 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
if ((bar_window->scroll_y == 0)
|
||||
|| (line >= bar_window->scroll_y))
|
||||
{
|
||||
if (!gui_bar_window_print_string (bar_window, filling,
|
||||
if (!gui_bar_window_print_string (bar_window,
|
||||
window,
|
||||
filling,
|
||||
&x, &y,
|
||||
items[line], 1, 1,
|
||||
&index_item,
|
||||
@@ -661,7 +672,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
{
|
||||
gui_window_set_custom_color_fg_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]),
|
||||
1);
|
||||
gui_window_remove_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
A_ALL_ATTR);
|
||||
@@ -674,7 +685,9 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
}
|
||||
while (x < bar_window->width)
|
||||
{
|
||||
gui_bar_window_print_string (bar_window, filling,
|
||||
gui_bar_window_print_string (bar_window,
|
||||
window,
|
||||
filling,
|
||||
&x, &y, " ", 0, 0,
|
||||
&index_item,
|
||||
&index_subitem,
|
||||
@@ -706,7 +719,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
{
|
||||
gui_window_set_custom_color_fg_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(config_color_bar_more),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]),
|
||||
1);
|
||||
mvwaddstr (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
y, x, ptr_string);
|
||||
@@ -726,7 +739,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
{
|
||||
gui_window_set_custom_color_fg_bg (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(config_color_bar_more),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]),
|
||||
1);
|
||||
mvwaddstr (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
y, x, ptr_string);
|
||||
@@ -743,7 +756,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
|
||||
gui_bar_window_set_current_size (bar_window, window, 1);
|
||||
gui_window_clear (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar,
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
|
||||
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]));
|
||||
CONFIG_COLOR(bar_window->bar->options[color_bg]));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+50
-14
@@ -50,11 +50,11 @@
|
||||
char *gui_bar_option_string[GUI_BAR_NUM_OPTIONS] =
|
||||
{ "hidden", "priority", "type", "conditions", "position", "filling_top_bottom",
|
||||
"filling_left_right", "size", "size_max", "color_fg", "color_delim",
|
||||
"color_bg", "separator", "items" };
|
||||
"color_bg", "color_bg_inactive", "separator", "items" };
|
||||
char *gui_bar_option_default[GUI_BAR_NUM_OPTIONS] =
|
||||
{ "0", "0", "0", "", "top", "horizontal",
|
||||
"vertical", "0", "0", "default", "default",
|
||||
"default", "off", "" };
|
||||
"default", "default", "off", "" };
|
||||
char *gui_bar_type_string[GUI_BAR_NUM_TYPES] =
|
||||
{ "root", "window" };
|
||||
char *gui_bar_position_string[GUI_BAR_NUM_POSITIONS] =
|
||||
@@ -1187,6 +1187,8 @@ gui_bar_set_name (struct t_gui_bar *bar, const char *name)
|
||||
config_file_option_rename (bar->options[GUI_BAR_OPTION_COLOR_DELIM], option_name);
|
||||
snprintf (option_name, length, "%s.color_bg", name);
|
||||
config_file_option_rename (bar->options[GUI_BAR_OPTION_COLOR_BG], option_name);
|
||||
snprintf (option_name, length, "%s.color_bg_inactive", name);
|
||||
config_file_option_rename (bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE], option_name);
|
||||
snprintf (option_name, length, "%s.separator", name);
|
||||
config_file_option_rename (bar->options[GUI_BAR_OPTION_SEPARATOR], option_name);
|
||||
snprintf (option_name, length, "%s.items", name);
|
||||
@@ -1277,6 +1279,12 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
|
||||
gui_bar_refresh (bar);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "color_bg_inactive") == 0)
|
||||
{
|
||||
config_file_option_set (bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE], value, 1);
|
||||
gui_bar_refresh (bar);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "separator") == 0)
|
||||
{
|
||||
config_file_option_set (bar->options[GUI_BAR_OPTION_SEPARATOR],
|
||||
@@ -1476,6 +1484,17 @@ gui_bar_create_option (const char *bar_name, int index_option, const char *value
|
||||
&gui_bar_config_change_color, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
case GUI_BAR_OPTION_COLOR_BG_INACTIVE:
|
||||
ptr_option = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_bar,
|
||||
option_name, "color",
|
||||
N_("background color for a bar with type \"window\" which is "
|
||||
"not displayed in the active window"),
|
||||
NULL, 0, 0, value, NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&gui_bar_config_change_color, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
case GUI_BAR_OPTION_SEPARATOR:
|
||||
ptr_option = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_bar,
|
||||
@@ -1583,6 +1602,7 @@ gui_bar_new_with_options (const char *name,
|
||||
struct t_config_option *color_fg,
|
||||
struct t_config_option *color_delim,
|
||||
struct t_config_option *color_bg,
|
||||
struct t_config_option *color_bg_inactive,
|
||||
struct t_config_option *separator,
|
||||
struct t_config_option *items)
|
||||
{
|
||||
@@ -1606,6 +1626,7 @@ gui_bar_new_with_options (const char *name,
|
||||
new_bar->options[GUI_BAR_OPTION_COLOR_FG] = color_fg;
|
||||
new_bar->options[GUI_BAR_OPTION_COLOR_DELIM] = color_delim;
|
||||
new_bar->options[GUI_BAR_OPTION_COLOR_BG] = color_bg;
|
||||
new_bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE] = color_bg_inactive;
|
||||
new_bar->options[GUI_BAR_OPTION_SEPARATOR] = separator;
|
||||
new_bar->options[GUI_BAR_OPTION_ITEMS] = items;
|
||||
new_bar->items_count = 0;
|
||||
@@ -1654,15 +1675,16 @@ gui_bar_new (const char *name, const char *hidden, const char *priority,
|
||||
const char *filling_top_bottom, const char *filling_left_right,
|
||||
const char *size, const char *size_max,
|
||||
const char *color_fg, const char *color_delim,
|
||||
const char *color_bg, const char *separators, const char *items)
|
||||
const char *color_bg, const char *color_bg_inactive,
|
||||
const char *separators, const char *items)
|
||||
{
|
||||
struct t_config_option *option_hidden, *option_priority, *option_type;
|
||||
struct t_config_option *option_conditions, *option_position;
|
||||
struct t_config_option *option_filling_top_bottom, *option_filling_left_right;
|
||||
struct t_config_option *option_size, *option_size_max;
|
||||
struct t_config_option *option_color_fg, *option_color_delim;
|
||||
struct t_config_option *option_color_bg, *option_separator;
|
||||
struct t_config_option *option_items;
|
||||
struct t_config_option *option_color_bg, *option_color_bg_inactive;
|
||||
struct t_config_option *option_separator, *option_items;
|
||||
struct t_gui_bar *new_bar;
|
||||
|
||||
if (!name || !name[0])
|
||||
@@ -1704,20 +1726,24 @@ gui_bar_new (const char *name, const char *hidden, const char *priority,
|
||||
color_delim);
|
||||
option_color_bg = gui_bar_create_option (name, GUI_BAR_OPTION_COLOR_BG,
|
||||
color_bg);
|
||||
option_color_bg_inactive = gui_bar_create_option (name, GUI_BAR_OPTION_COLOR_BG_INACTIVE,
|
||||
color_bg_inactive);
|
||||
option_separator = gui_bar_create_option (name, GUI_BAR_OPTION_SEPARATOR,
|
||||
(config_file_string_to_boolean (separators)) ?
|
||||
"on" : "off");
|
||||
option_items = gui_bar_create_option (name, GUI_BAR_OPTION_ITEMS,
|
||||
items);
|
||||
new_bar = gui_bar_new_with_options (name, option_hidden,
|
||||
option_priority, option_type,
|
||||
option_conditions, option_position,
|
||||
option_filling_top_bottom,
|
||||
option_filling_left_right,
|
||||
option_size, option_size_max,
|
||||
option_color_fg, option_color_delim,
|
||||
option_color_bg, option_separator,
|
||||
option_items);
|
||||
new_bar = gui_bar_new_with_options (
|
||||
name, option_hidden,
|
||||
option_priority, option_type,
|
||||
option_conditions, option_position,
|
||||
option_filling_top_bottom,
|
||||
option_filling_left_right,
|
||||
option_size, option_size_max,
|
||||
option_color_fg, option_color_delim,
|
||||
option_color_bg, option_color_bg_inactive,
|
||||
option_separator,
|
||||
option_items);
|
||||
if (!new_bar)
|
||||
{
|
||||
if (option_hidden)
|
||||
@@ -1794,6 +1820,7 @@ gui_bar_use_temp_bars ()
|
||||
ptr_temp_bar->options[GUI_BAR_OPTION_COLOR_FG],
|
||||
ptr_temp_bar->options[GUI_BAR_OPTION_COLOR_DELIM],
|
||||
ptr_temp_bar->options[GUI_BAR_OPTION_COLOR_BG],
|
||||
ptr_temp_bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE],
|
||||
ptr_temp_bar->options[GUI_BAR_OPTION_SEPARATOR],
|
||||
ptr_temp_bar->options[GUI_BAR_OPTION_ITEMS]);
|
||||
}
|
||||
@@ -1878,6 +1905,7 @@ gui_bar_create_default_input ()
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"default", /* color bg */
|
||||
"default", /* color bg inactive */
|
||||
"0", /* separators */
|
||||
gui_bar_default_items (GUI_BAR_DEFAULT_NAME_INPUT))) /* items */
|
||||
{
|
||||
@@ -1915,6 +1943,7 @@ gui_bar_create_default_title ()
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"blue", /* color bg */
|
||||
"darkgray", /* color bg inactive */
|
||||
"0", /* separators */
|
||||
gui_bar_default_items (GUI_BAR_DEFAULT_NAME_TITLE))) /* items */
|
||||
{
|
||||
@@ -1951,6 +1980,7 @@ gui_bar_create_default_status ()
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"blue", /* color bg */
|
||||
"darkgray", /* color bg inactive */
|
||||
"0", /* separators */
|
||||
gui_bar_default_items (GUI_BAR_DEFAULT_NAME_STATUS))) /* items */
|
||||
{
|
||||
@@ -1987,6 +2017,7 @@ gui_bar_create_default_nicklist ()
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"default", /* color bg */
|
||||
"default", /* color bg inactive */
|
||||
"1", /* separators */
|
||||
gui_bar_default_items (GUI_BAR_DEFAULT_NAME_NICKLIST))) /* items */
|
||||
{
|
||||
@@ -2321,6 +2352,8 @@ gui_bar_add_to_infolist (struct t_infolist *infolist,
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "color_bg", gui_color_get_name (CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_BG]))))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "color_bg_inactive", gui_color_get_name (CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE]))))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (ptr_item, "separator", CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SEPARATOR])))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "items", CONFIG_STRING(bar->options[GUI_BAR_OPTION_ITEMS])))
|
||||
@@ -2400,6 +2433,9 @@ gui_bar_print_log ()
|
||||
log_printf (" color_bg . . . . . . . : %d (%s)",
|
||||
CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_BG]),
|
||||
gui_color_get_name (CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_BG])));
|
||||
log_printf (" color_bg_inactive. . . : %d (%s)",
|
||||
CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE]),
|
||||
gui_color_get_name (CONFIG_COLOR(ptr_bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE])));
|
||||
log_printf (" separator. . . . . . . : %d", CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SEPARATOR]));
|
||||
log_printf (" items. . . . . . . . . : '%s'", CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_ITEMS]));
|
||||
log_printf (" items_count. . . . . . : %d", ptr_bar->items_count);
|
||||
|
||||
@@ -43,6 +43,8 @@ enum t_gui_bar_option
|
||||
GUI_BAR_OPTION_COLOR_FG, /* default text color for bar */
|
||||
GUI_BAR_OPTION_COLOR_DELIM, /* default delimiter color for bar */
|
||||
GUI_BAR_OPTION_COLOR_BG, /* default background color for bar */
|
||||
GUI_BAR_OPTION_COLOR_BG_INACTIVE, /* bg color for inactive window */
|
||||
/* (window bars only) */
|
||||
GUI_BAR_OPTION_SEPARATOR, /* true if separator line displayed */
|
||||
GUI_BAR_OPTION_ITEMS, /* bar items */
|
||||
/* number of bar options */
|
||||
@@ -140,6 +142,7 @@ extern struct t_gui_bar *gui_bar_new (const char *name,
|
||||
const char *color_fg,
|
||||
const char *color_delim,
|
||||
const char *color_bg,
|
||||
const char *color_bg_inactive,
|
||||
const char *separator,
|
||||
const char *items);
|
||||
extern void gui_bar_use_temp_bars ();
|
||||
|
||||
@@ -59,7 +59,7 @@ buflist_add_bar ()
|
||||
{
|
||||
weechat_bar_new (BUFLIST_BAR_NAME, "off", "0", "root", "", "left",
|
||||
"columns_vertical", "vertical", "0", "0",
|
||||
"default", "default", "default", "on",
|
||||
"default", "default", "default", "default", "on",
|
||||
BUFLIST_BAR_ITEM_NAME);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ fset_add_bar ()
|
||||
FSET_BAR_NAME, "off", "0", "window",
|
||||
"${buffer.full_name} == " FSET_PLUGIN_NAME "." FSET_BAR_NAME,
|
||||
"top", "horizontal", "vertical", "3", "3",
|
||||
"default", "cyan", "default", "on",
|
||||
"default", "cyan", "default", "default", "on",
|
||||
FSET_BAR_ITEM_NAME);
|
||||
}
|
||||
|
||||
|
||||
@@ -3973,12 +3973,12 @@ weechat_guile_api_bar_new (SCM args)
|
||||
{
|
||||
SCM name, hidden, priority, type, conditions, position, filling_top_bottom;
|
||||
SCM filling_left_right, size, size_max, color_fg, color_delim, color_bg;
|
||||
SCM separator, items;
|
||||
SCM color_bg_inactive, separator, items;
|
||||
const char *result;
|
||||
SCM return_value;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
if (!scm_list_p (args) || (scm_to_int (scm_length (args)) != 15))
|
||||
if (!scm_list_p (args) || (scm_to_int (scm_length (args)) != 16))
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
name = scm_list_ref (args, scm_from_int (0));
|
||||
@@ -3994,8 +3994,9 @@ weechat_guile_api_bar_new (SCM args)
|
||||
color_fg = scm_list_ref (args, scm_from_int (10));
|
||||
color_delim = scm_list_ref (args, scm_from_int (11));
|
||||
color_bg = scm_list_ref (args, scm_from_int (12));
|
||||
separator = scm_list_ref (args, scm_from_int (13));
|
||||
items = scm_list_ref (args, scm_from_int (14));
|
||||
color_bg_inactive = scm_list_ref (args, scm_from_int (13));
|
||||
separator = scm_list_ref (args, scm_from_int (14));
|
||||
items = scm_list_ref (args, scm_from_int (15));
|
||||
|
||||
if (!scm_is_string (name) || !scm_is_string (hidden)
|
||||
|| !scm_is_string (priority) || !scm_is_string (type)
|
||||
@@ -4003,25 +4004,28 @@ weechat_guile_api_bar_new (SCM args)
|
||||
|| !scm_is_string (filling_top_bottom) || !scm_is_string (filling_left_right)
|
||||
|| !scm_is_string (size) || !scm_is_string (size_max)
|
||||
|| !scm_is_string (color_fg) || !scm_is_string (color_delim)
|
||||
|| !scm_is_string (color_bg) || !scm_is_string (separator)
|
||||
|| !scm_is_string (items))
|
||||
|| !scm_is_string (color_bg) || !scm_is_string (color_bg_inactive)
|
||||
|| !scm_is_string (separator) || !scm_is_string (items))
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = API_PTR2STR(weechat_bar_new (API_SCM_TO_STRING(name),
|
||||
API_SCM_TO_STRING(hidden),
|
||||
API_SCM_TO_STRING(priority),
|
||||
API_SCM_TO_STRING(type),
|
||||
API_SCM_TO_STRING(conditions),
|
||||
API_SCM_TO_STRING(position),
|
||||
API_SCM_TO_STRING(filling_top_bottom),
|
||||
API_SCM_TO_STRING(filling_left_right),
|
||||
API_SCM_TO_STRING(size),
|
||||
API_SCM_TO_STRING(size_max),
|
||||
API_SCM_TO_STRING(color_fg),
|
||||
API_SCM_TO_STRING(color_delim),
|
||||
API_SCM_TO_STRING(color_bg),
|
||||
API_SCM_TO_STRING(separator),
|
||||
API_SCM_TO_STRING(items)));
|
||||
result = API_PTR2STR(
|
||||
weechat_bar_new (
|
||||
API_SCM_TO_STRING(name),
|
||||
API_SCM_TO_STRING(hidden),
|
||||
API_SCM_TO_STRING(priority),
|
||||
API_SCM_TO_STRING(type),
|
||||
API_SCM_TO_STRING(conditions),
|
||||
API_SCM_TO_STRING(position),
|
||||
API_SCM_TO_STRING(filling_top_bottom),
|
||||
API_SCM_TO_STRING(filling_left_right),
|
||||
API_SCM_TO_STRING(size),
|
||||
API_SCM_TO_STRING(size_max),
|
||||
API_SCM_TO_STRING(color_fg),
|
||||
API_SCM_TO_STRING(color_delim),
|
||||
API_SCM_TO_STRING(color_bg),
|
||||
API_SCM_TO_STRING(color_bg_inactive),
|
||||
API_SCM_TO_STRING(separator),
|
||||
API_SCM_TO_STRING(items)));
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
@@ -3888,7 +3888,7 @@ API_FUNC(bar_new)
|
||||
{
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", "sssssssssssssss", API_RETURN_EMPTY);
|
||||
API_INIT_FUNC(1, "bar_new", "ssssssssssssssss", API_RETURN_EMPTY);
|
||||
|
||||
v8::String::Utf8Value name(args[0]);
|
||||
v8::String::Utf8Value hidden(args[1]);
|
||||
@@ -3903,8 +3903,9 @@ API_FUNC(bar_new)
|
||||
v8::String::Utf8Value color_fg(args[10]);
|
||||
v8::String::Utf8Value color_delim(args[11]);
|
||||
v8::String::Utf8Value color_bg(args[12]);
|
||||
v8::String::Utf8Value separator(args[13]);
|
||||
v8::String::Utf8Value items(args[14]);
|
||||
v8::String::Utf8Value color_bg_inactive(args[13]);
|
||||
v8::String::Utf8Value separator(args[14]);
|
||||
v8::String::Utf8Value items(args[15]);
|
||||
|
||||
result = API_PTR2STR(weechat_bar_new (*name,
|
||||
*hidden,
|
||||
@@ -3919,6 +3920,7 @@ API_FUNC(bar_new)
|
||||
*color_fg,
|
||||
*color_delim,
|
||||
*color_bg,
|
||||
*color_bg_inactive,
|
||||
*separator,
|
||||
*items));
|
||||
|
||||
|
||||
@@ -4208,26 +4208,28 @@ API_FUNC(bar_new)
|
||||
{
|
||||
const char *name, *hidden, *priority, *type, *conditions, *position;
|
||||
const char *filling_top_bottom, *filling_left_right, *size, *size_max;
|
||||
const char *color_fg, *color_delim, *color_bg, *separator, *items;
|
||||
const char *color_fg, *color_delim, *color_bg, *color_bg_inactive;
|
||||
const char *separator, *items;
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
if (lua_gettop (L) < 15)
|
||||
if (lua_gettop (L) < 16)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
name = lua_tostring (L, -15);
|
||||
hidden = lua_tostring (L, -14);
|
||||
priority = lua_tostring (L, -13);
|
||||
type = lua_tostring (L, -12);
|
||||
conditions = lua_tostring (L, -11);
|
||||
position = lua_tostring (L, -10);
|
||||
filling_top_bottom = lua_tostring (L, -9);
|
||||
filling_left_right = lua_tostring (L, -8);
|
||||
size = lua_tostring (L, -7);
|
||||
size_max = lua_tostring (L, -6);
|
||||
color_fg = lua_tostring (L, -5);
|
||||
color_delim = lua_tostring (L, -4);
|
||||
color_bg = lua_tostring (L, -3);
|
||||
name = lua_tostring (L, -16);
|
||||
hidden = lua_tostring (L, -15);
|
||||
priority = lua_tostring (L, -14);
|
||||
type = lua_tostring (L, -13);
|
||||
conditions = lua_tostring (L, -12);
|
||||
position = lua_tostring (L, -11);
|
||||
filling_top_bottom = lua_tostring (L, -10);
|
||||
filling_left_right = lua_tostring (L, -9);
|
||||
size = lua_tostring (L, -8);
|
||||
size_max = lua_tostring (L, -7);
|
||||
color_fg = lua_tostring (L, -6);
|
||||
color_delim = lua_tostring (L, -5);
|
||||
color_bg = lua_tostring (L, -4);
|
||||
color_bg_inactive = lua_tostring (L, -3);
|
||||
separator = lua_tostring (L, -2);
|
||||
items = lua_tostring (L, -1);
|
||||
|
||||
@@ -4244,6 +4246,7 @@ API_FUNC(bar_new)
|
||||
color_fg,
|
||||
color_delim,
|
||||
color_bg,
|
||||
color_bg_inactive,
|
||||
separator,
|
||||
items));
|
||||
|
||||
|
||||
@@ -4130,12 +4130,12 @@ API_FUNC(bar_new)
|
||||
{
|
||||
char *name, *hidden, *priority, *type, *conditions, *position;
|
||||
char *filling_top_bottom, *filling_left_right, *size, *size_max, *color_fg;
|
||||
char *color_delim, *color_bg, *separator, *bar_items;
|
||||
char *color_delim, *color_bg, *color_bg_inactive, *separator, *bar_items;
|
||||
const char *result;
|
||||
dXSARGS;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
if (items < 15)
|
||||
if (items < 16)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
name = SvPV_nolen (ST (0));
|
||||
@@ -4151,8 +4151,9 @@ API_FUNC(bar_new)
|
||||
color_fg = SvPV_nolen (ST (10));
|
||||
color_delim = SvPV_nolen (ST (11));
|
||||
color_bg = SvPV_nolen (ST (12));
|
||||
separator = SvPV_nolen (ST (13));
|
||||
bar_items = SvPV_nolen (ST (14));
|
||||
color_bg_inactive = SvPV_nolen (ST (13));
|
||||
separator = SvPV_nolen (ST (14));
|
||||
bar_items = SvPV_nolen (ST (15));
|
||||
|
||||
result = API_PTR2STR(weechat_bar_new (name,
|
||||
hidden,
|
||||
@@ -4167,6 +4168,7 @@ API_FUNC(bar_new)
|
||||
color_fg,
|
||||
color_delim,
|
||||
color_bg,
|
||||
color_bg_inactive,
|
||||
separator,
|
||||
bar_items));
|
||||
|
||||
|
||||
@@ -4117,19 +4117,19 @@ API_FUNC(bar_new)
|
||||
zend_string *z_name, *z_hidden, *z_priority, *z_type, *z_condition;
|
||||
zend_string *z_position, *z_filling_top_bottom, *z_filling_left_right;
|
||||
zend_string *z_size, *z_size_max, *z_color_fg, *z_color_delim, *z_color_bg;
|
||||
zend_string *z_separator, *z_items;
|
||||
zend_string *z_color_bg_inactive, *z_separator, *z_items;
|
||||
char *name, *hidden, *priority, *type, *condition, *position;
|
||||
char *filling_top_bottom, *filling_left_right, *size, *size_max, *color_fg;
|
||||
char *color_delim, *color_bg, *separator, *items;
|
||||
char *color_delim, *color_bg, *color_bg_inactive, *separator, *items;
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
if (zend_parse_parameters (
|
||||
ZEND_NUM_ARGS(), "SSSSSSSSSSSSSSS", &z_name, &z_hidden,
|
||||
ZEND_NUM_ARGS(), "SSSSSSSSSSSSSSSS", &z_name, &z_hidden,
|
||||
&z_priority, &z_type, &z_condition, &z_position,
|
||||
&z_filling_top_bottom, &z_filling_left_right, &z_size, &z_size_max,
|
||||
&z_color_fg, &z_color_delim, &z_color_bg, &z_separator,
|
||||
&z_items) == FAILURE)
|
||||
&z_color_fg, &z_color_delim, &z_color_bg, &z_color_bg_inactive,
|
||||
&z_separator, &z_items) == FAILURE)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
name = ZSTR_VAL(z_name);
|
||||
@@ -4145,6 +4145,7 @@ API_FUNC(bar_new)
|
||||
color_fg = ZSTR_VAL(z_color_fg);
|
||||
color_delim = ZSTR_VAL(z_color_delim);
|
||||
color_bg = ZSTR_VAL(z_color_bg);
|
||||
color_bg_inactive = ZSTR_VAL(z_color_bg_inactive);
|
||||
separator = ZSTR_VAL(z_separator);
|
||||
items = ZSTR_VAL(z_items);
|
||||
|
||||
@@ -4163,6 +4164,7 @@ API_FUNC(bar_new)
|
||||
(const char *)color_fg,
|
||||
(const char *)color_delim,
|
||||
(const char *)color_bg,
|
||||
(const char *)color_bg_inactive,
|
||||
(const char *)separator,
|
||||
(const char *)items));
|
||||
|
||||
|
||||
@@ -4145,7 +4145,8 @@ API_FUNC(bar_new)
|
||||
{
|
||||
char *name, *hidden, *priority, *type, *conditions, *position;
|
||||
char *filling_top_bottom, *filling_left_right, *size, *size_max;
|
||||
char *color_fg, *color_delim, *color_bg, *separator, *items;
|
||||
char *color_fg, *color_delim, *color_bg, *color_bg_inactive, *separator;
|
||||
char *items;
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
@@ -4162,12 +4163,14 @@ API_FUNC(bar_new)
|
||||
color_fg = NULL;
|
||||
color_delim = NULL;
|
||||
color_bg = NULL;
|
||||
color_bg_inactive = NULL;
|
||||
separator = NULL;
|
||||
items = NULL;
|
||||
if (!PyArg_ParseTuple (args, "sssssssssssssss", &name, &hidden, &priority,
|
||||
if (!PyArg_ParseTuple (args, "ssssssssssssssss", &name, &hidden, &priority,
|
||||
&type, &conditions, &position, &filling_top_bottom,
|
||||
&filling_left_right, &size, &size_max, &color_fg,
|
||||
&color_delim, &color_bg, &separator, &items))
|
||||
&color_delim, &color_bg, &color_bg_inactive,
|
||||
&separator, &items))
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = API_PTR2STR(weechat_bar_new (name,
|
||||
@@ -4183,6 +4186,7 @@ API_FUNC(bar_new)
|
||||
color_fg,
|
||||
color_delim,
|
||||
color_bg,
|
||||
color_bg_inactive,
|
||||
separator,
|
||||
items));
|
||||
|
||||
|
||||
@@ -4975,20 +4975,21 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
|
||||
VALUE priority, VALUE type, VALUE conditions,
|
||||
VALUE position, VALUE filling_top_bottom,
|
||||
VALUE filling_left_right, VALUE size,
|
||||
VALUE size_max, VALUE color_fg, VALUE color_delim,
|
||||
VALUE color_bg, VALUE separator, VALUE items)
|
||||
VALUE size_max, VALUE colors, VALUE separator,
|
||||
VALUE items)
|
||||
{
|
||||
char *c_name, *c_hidden, *c_priority, *c_type, *c_conditions, *c_position;
|
||||
char *c_filling_top_bottom, *c_filling_left_right, *c_size, *c_size_max;
|
||||
char *c_color_fg, *c_color_delim, *c_color_bg, *c_separator, *c_items;
|
||||
char *c_color_fg, *c_color_delim, *c_color_bg, *c_color_bg_inactive;
|
||||
char *c_separator, *c_items;
|
||||
const char *result;
|
||||
VALUE color_fg, color_delim, color_bg, color_bg_inactive;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
if (NIL_P (name) || NIL_P (hidden) || NIL_P (priority) || NIL_P (type)
|
||||
|| NIL_P (conditions) || NIL_P (position) || NIL_P (filling_top_bottom)
|
||||
|| NIL_P (filling_left_right) || NIL_P (size) || NIL_P (size_max)
|
||||
|| NIL_P (color_fg) || NIL_P (color_delim) || NIL_P (color_bg)
|
||||
|| NIL_P (separator) || NIL_P (items))
|
||||
|| NIL_P (colors) || NIL_P (separator) || NIL_P (items))
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
Check_Type (name, T_STRING);
|
||||
@@ -5001,12 +5002,22 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
|
||||
Check_Type (filling_left_right, T_STRING);
|
||||
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 (colors, T_ARRAY);
|
||||
Check_Type (separator, T_STRING);
|
||||
Check_Type (items, T_STRING);
|
||||
|
||||
/*
|
||||
* due to a Ruby limitation (15 arguments max by function), we receive the
|
||||
* colors in an array of 4 strings (fg, delim, bg, bg_inactive)
|
||||
*/
|
||||
if (RARRAY_LEN(colors) != 4)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
color_fg = rb_ary_entry (colors, 0);
|
||||
color_delim = rb_ary_entry (colors, 1);
|
||||
color_bg = rb_ary_entry (colors, 2);
|
||||
color_bg_inactive = rb_ary_entry (colors, 3);
|
||||
|
||||
c_name = StringValuePtr (name);
|
||||
c_hidden = StringValuePtr (hidden);
|
||||
c_priority = StringValuePtr (priority);
|
||||
@@ -5020,6 +5031,7 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
|
||||
c_color_fg = StringValuePtr (color_fg);
|
||||
c_color_delim = StringValuePtr (color_delim);
|
||||
c_color_bg = StringValuePtr (color_bg);
|
||||
c_color_bg_inactive = StringValuePtr (color_bg_inactive);
|
||||
c_separator = StringValuePtr (separator);
|
||||
c_items = StringValuePtr (items);
|
||||
|
||||
@@ -5036,6 +5048,7 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
|
||||
c_color_fg,
|
||||
c_color_delim,
|
||||
c_color_bg,
|
||||
c_color_bg_inactive,
|
||||
c_separator,
|
||||
c_items));
|
||||
|
||||
@@ -6544,7 +6557,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
|
||||
API_DEF_FUNC(bar_item_update, 1);
|
||||
API_DEF_FUNC(bar_item_remove, 1);
|
||||
API_DEF_FUNC(bar_search, 1);
|
||||
API_DEF_FUNC(bar_new, 15);
|
||||
API_DEF_FUNC(bar_new, 13);
|
||||
API_DEF_FUNC(bar_set, 3);
|
||||
API_DEF_FUNC(bar_update, 1);
|
||||
API_DEF_FUNC(bar_remove, 1);
|
||||
|
||||
@@ -4493,12 +4493,12 @@ API_FUNC(bar_new)
|
||||
Tcl_Obj *objp;
|
||||
char *name, *hidden, *priority, *type, *conditions, *position;
|
||||
char *filling_top_bottom, *filling_left_right, *size, *size_max, *color_fg;
|
||||
char *color_delim, *color_bg, *separator, *bar_items;
|
||||
char *color_delim, *color_bg, *color_bg_inactive, *separator, *bar_items;
|
||||
const char *result;
|
||||
int i;
|
||||
|
||||
API_INIT_FUNC(1, "bar_new", API_RETURN_EMPTY);
|
||||
if (objc < 16)
|
||||
if (objc < 17)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
name = Tcl_GetStringFromObj (objv[1], &i);
|
||||
@@ -4514,8 +4514,9 @@ API_FUNC(bar_new)
|
||||
color_fg = Tcl_GetStringFromObj (objv[11], &i);
|
||||
color_delim = Tcl_GetStringFromObj (objv[12], &i);
|
||||
color_bg = Tcl_GetStringFromObj (objv[13], &i);
|
||||
separator = Tcl_GetStringFromObj (objv[14], &i);
|
||||
bar_items = Tcl_GetStringFromObj (objv[15], &i);
|
||||
color_bg_inactive = Tcl_GetStringFromObj (objv[14], &i);
|
||||
separator = Tcl_GetStringFromObj (objv[15], &i);
|
||||
bar_items = Tcl_GetStringFromObj (objv[16], &i);
|
||||
|
||||
result = API_PTR2STR(weechat_bar_new (name,
|
||||
hidden,
|
||||
@@ -4530,6 +4531,7 @@ API_FUNC(bar_new)
|
||||
color_fg,
|
||||
color_delim,
|
||||
color_bg,
|
||||
color_bg_inactive,
|
||||
separator,
|
||||
bar_items));
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ struct timeval;
|
||||
* please change the date with current one; for a second change at same
|
||||
* date, increment the 01, otherwise please keep 01.
|
||||
*/
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20200508-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20200621-01"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
@@ -995,6 +995,7 @@ struct t_weechat_plugin
|
||||
const char *color_fg,
|
||||
const char *color_delim,
|
||||
const char *color_bg,
|
||||
const char *color_bg_inactive,
|
||||
const char *separator,
|
||||
const char *items);
|
||||
int (*bar_set) (struct t_gui_bar *bar, const char *property,
|
||||
@@ -1933,13 +1934,14 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
|
||||
__condition, __position, __filling_top_bottom, \
|
||||
__filling_left_right, __size, __size_max, \
|
||||
__color_fg, __color_delim, __color_bg, \
|
||||
__separator, __items) \
|
||||
__color_bg_inactive, __separator, __items) \
|
||||
(weechat_plugin->bar_new)(__name, __hidden, __priority, __type, \
|
||||
__condition, __position, \
|
||||
__filling_top_bottom, \
|
||||
__filling_left_right, \
|
||||
__size, __size_max, __color_fg, \
|
||||
__color_delim, __color_bg, __separator, \
|
||||
__color_delim, __color_bg, \
|
||||
__color_bg_inactive, __separator, \
|
||||
__items)
|
||||
#define weechat_bar_set(__bar, __property, __value) \
|
||||
(weechat_plugin->bar_set)(__bar, __property, __value)
|
||||
|
||||
Reference in New Issue
Block a user