mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 23:36:37 +02:00
api: do not check hotlist add conditions when adding buffer in hotlist with function buffer_set
This commit is contained in:
@@ -3293,7 +3293,11 @@ COMMAND_CALLBACK(hotlist)
|
||||
if (priority < 0)
|
||||
COMMAND_ERROR;
|
||||
}
|
||||
gui_hotlist_add (buffer, priority, NULL, 0);
|
||||
gui_hotlist_add (
|
||||
buffer,
|
||||
priority,
|
||||
NULL, /* creation_time */
|
||||
0); /* check_conditions */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -767,10 +767,11 @@ upgrade_weechat_read_hotlist (struct t_infolist *infolist)
|
||||
if (buf)
|
||||
{
|
||||
memcpy (&creation_time, buf, size);
|
||||
new_hotlist = gui_hotlist_add (ptr_buffer,
|
||||
infolist_integer (infolist, "priority"),
|
||||
&creation_time,
|
||||
1);
|
||||
new_hotlist = gui_hotlist_add (
|
||||
ptr_buffer,
|
||||
infolist_integer (infolist, "priority"),
|
||||
&creation_time,
|
||||
1); /* check_conditions */
|
||||
if (new_hotlist)
|
||||
{
|
||||
for (i = 0; i < GUI_HOTLIST_NUM_PRIORITIES; i++)
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-4
@@ -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 */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user