mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 15:26:37 +02:00
core: add new option weechat.look.item_buffer_filter
This commit is contained in:
@@ -107,6 +107,7 @@ struct t_config_option *config_look_input_share;
|
||||
struct t_config_option *config_look_input_share_overwrite;
|
||||
struct t_config_option *config_look_input_undo_max;
|
||||
struct t_config_option *config_look_item_time_format;
|
||||
struct t_config_option *config_look_item_buffer_filter;
|
||||
struct t_config_option *config_look_jump_current_to_previous_buffer;
|
||||
struct t_config_option *config_look_jump_previous_buffer_when_closing;
|
||||
struct t_config_option *config_look_mouse;
|
||||
@@ -1783,7 +1784,13 @@ config_weechat_init_options ()
|
||||
"item_time_format", "string",
|
||||
N_("time format for \"time\" bar item (see man strftime for date/time "
|
||||
"specifiers)"),
|
||||
NULL, 0, 0, "%H:%M", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
NULL, 0, 0, "%H:%M", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
|
||||
config_look_item_buffer_filter = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"item_buffer_filter", "string",
|
||||
N_("string used to show that some lines are filtered in current buffer "
|
||||
"(bar item \"buffer_filter\""),
|
||||
NULL, 0, 0, "*", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
|
||||
config_look_jump_current_to_previous_buffer = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"jump_current_to_previous_buffer", "boolean",
|
||||
|
||||
@@ -131,6 +131,7 @@ extern struct t_config_option *config_look_input_share;
|
||||
extern struct t_config_option *config_look_input_share_overwrite;
|
||||
extern struct t_config_option *config_look_input_undo_max;
|
||||
extern struct t_config_option *config_look_item_time_format;
|
||||
extern struct t_config_option *config_look_item_buffer_filter;
|
||||
extern struct t_config_option *config_look_jump_current_to_previous_buffer;
|
||||
extern struct t_config_option *config_look_jump_previous_buffer_when_closing;
|
||||
extern struct t_config_option *config_look_mouse;
|
||||
|
||||
@@ -932,7 +932,7 @@ char *
|
||||
gui_bar_item_default_buffer_filter (void *data, struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window)
|
||||
{
|
||||
char buf[256];
|
||||
char buf[512];
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -945,8 +945,9 @@ gui_bar_item_default_buffer_filter (void *data, struct t_gui_bar_item *item,
|
||||
return NULL;
|
||||
|
||||
snprintf (buf, sizeof (buf),
|
||||
"%s*",
|
||||
gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_filter))));
|
||||
"%s%s",
|
||||
gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_filter))),
|
||||
CONFIG_STRING(config_look_item_buffer_filter));
|
||||
|
||||
return strdup (buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user