summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-05-01 20:22:34 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-05-01 20:23:48 +0200
commite75009a46185d138bfb4151052c5685a2234a606 (patch)
tree66b682b7187f91b2e035a92abf3da89375a1519c /src/core
parent385b1d0133dccd27c5b091232ff0ce975ba6c7a3 (diff)
downloadweechat-e75009a46185d138bfb4151052c5685a2234a606.zip
core: add enabled/disabled status color in output of `/filter list` (closes #1820)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-command.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 8d753774c..9a9644cac 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -2382,21 +2382,20 @@ COMMAND_CALLBACK(eval)
void
command_filter_display (struct t_gui_filter *filter)
{
- gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
- _(" %s[%s%s%s]%s buffer: %s%s%s "
- "/ tags: %s / regex: %s %s"),
- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
- GUI_COLOR(GUI_COLOR_CHAT),
- filter->name,
- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
- GUI_COLOR(GUI_COLOR_CHAT),
- GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
- filter->buffer_name,
- GUI_COLOR(GUI_COLOR_CHAT),
- filter->tags,
- filter->regex,
- (filter->enabled) ?
- "" : _("(disabled)"));
+ gui_chat_printf_date_tags (
+ NULL, 0, GUI_FILTER_TAG_NO_FILTER,
+ _(" %s%s%s: buffer: %s%s%s "
+ "/ tags: %s / regex: %s"),
+ GUI_COLOR(
+ (filter->enabled) ?
+ GUI_COLOR_CHAT_STATUS_ENABLED : GUI_COLOR_CHAT_STATUS_DISABLED),
+ filter->name,
+ GUI_COLOR(GUI_COLOR_CHAT),
+ GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
+ filter->buffer_name,
+ GUI_COLOR(GUI_COLOR_CHAT),
+ filter->tags,
+ filter->regex);
}
/*