diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-25 20:35:10 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-25 20:35:10 +0100 |
commit | 2ad6f2f3d5fbc8bcfeb71a7bce0025d9e47a6dd9 (patch) | |
tree | 14452dda3a3642450cd9ed2b4479f36ed808cd90 /src/gui | |
parent | a9094fd2fa7d0848fd07d3f564806e93388de173 (diff) | |
download | weechat-2ad6f2f3d5fbc8bcfeb71a7bce0025d9e47a6dd9.zip |
api: do not check hotlist add conditions when adding buffer in hotlist with function buffer_set
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-buffer.c | 10 | ||||
-rw-r--r-- | src/gui/gui-line.c | 14 |
2 files changed, 19 insertions, 5 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index aea60fa0e..62442f5ea 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -2157,9 +2157,17 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, if (error && !error[0]) { if (number < 0) + { gui_hotlist_remove_buffer (buffer, 0); + } else - (void) gui_hotlist_add (buffer, number, NULL, 1); + { + (void) gui_hotlist_add ( + buffer, + number, + NULL, /* creation_time */ + 0); /* check_conditions */ + } } } } diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index da8a3196a..4e29d5685 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -1790,8 +1790,11 @@ gui_line_add (struct t_gui_line *line) if ((line->data->notify_level >= GUI_HOTLIST_MIN) && line->data->highlight) { - (void) gui_hotlist_add (line->data->buffer, - GUI_HOTLIST_HIGHLIGHT, NULL, 1); + (void) gui_hotlist_add ( + line->data->buffer, + GUI_HOTLIST_HIGHLIGHT, + NULL, /* creation_time */ + 1); /* check_conditions */ if (!weechat_upgrading) { message_for_signal = gui_line_build_string_prefix_message ( @@ -1822,8 +1825,11 @@ gui_line_add (struct t_gui_line *line) } if (line->data->notify_level >= GUI_HOTLIST_MIN) { - (void) gui_hotlist_add (line->data->buffer, - line->data->notify_level, NULL, 1); + (void) gui_hotlist_add ( + line->data->buffer, + line->data->notify_level, + NULL, /* creation_time */ + 1); /* check_conditions */ } } } |