1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

api: do not check hotlist add conditions when adding buffer in hotlist with function buffer_set

This commit is contained in:
Sébastien Helleu
2022-12-25 20:35:10 +01:00
parent a9094fd2fa
commit 2ad6f2f3d5
10 changed files with 48 additions and 15 deletions
+1
View File
@@ -41,6 +41,7 @@ Bug fixes::
* core: fix context info in buffers with free content (issue #1832)
* core: keep terminal title unchanged when option weechat.look.window_title is set to empty value (issue #1835, issue #1836)
* core: fix crash when setting invalid color in option with null value (issue #1844)
* api: do not check conditions defined in option weechat.look.hotlist_add_conditions when adding buffer in hotlist with function buffer_set
* api: fix function strcmp_ignore_chars with case sensitive comparison and wide chars starting with the same byte
* api: send NULL values to config section callbacks in scripting API (issue #1843)
* api: fix function string_cut when there are non printable chars in suffix
+3 -1
View File
@@ -13765,7 +13765,9 @@ Properties:
WEECHAT_HOTLIST_PRIVATE, WEECHAT_HOTLIST_HIGHLIGHT, "-1"
| "+": enable hotlist (global setting, buffer pointer is not used) +
"-": disable hotlist (global setting, buffer pointer is not used) +
priority: add buffer to hotlist with this priority +
priority: add buffer to hotlist with this priority
(conditions defined in option _weechat.look.hotlist_add_conditions_
are *NOT* checked) +
"-1": remove buffer from hotlist _(WeeChat ≥ 1.0)_.
| completion_freeze | | "0" or "1"
+3 -1
View File
@@ -14064,7 +14064,9 @@ Propriétés :
utilisé) +
"-" : désactive la hotlist (option globale, le pointeur vers le tampon n'est
pas utilisé) +
priorité : ajouter ce tampon dans la hotlist avec cette priorité +
priorité : ajouter ce tampon dans la hotlist avec cette priorité
(les conditions définies dans l'option _weechat.look.hotlist_add_conditions_
ne sont *PAS* vérifiées) +
"-1" : supprimer ce tampon de la hotlist _(WeeChat ≥ 1.0)_.
| completion_freeze | | "0" ou "1"
+4 -1
View File
@@ -14400,11 +14400,14 @@ Properties:
// TRANSLATION MISSING
| hotlist | | "+", "-", WEECHAT_HOTLIST_LOW, WEECHAT_HOTLIST_MESSAGE,
WEECHAT_HOTLIST_PRIVATE, WEECHAT_HOTLIST_HIGHLIGHT, "-1"
// TRANSLATION MISSING
| "+": abilita hotlist (impostazione globale , il puntatore al buffer pointer non
è utilizzato) +
"-": disabilita hotlist (impostazione globale, il puntatore al buffer non è
utilizzato) +
priorità: aggiunge il buffer alla hotlist con questa proprietà +
priorità: aggiunge il buffer alla hotlist con questa proprietà
(conditions defined in option _weechat.look.hotlist_add_conditions_
are *NOT* checked) +
"-1": remove buffer from hotlist _(WeeChat ≥ 1.0)_.
// TRANSLATION MISSING
+4 -1
View File
@@ -13913,9 +13913,12 @@ void weechat_buffer_set (struct t_gui_buffer *buffer, const char *property,
| hotlist | | "+", "-", WEECHAT_HOTLIST_LOW, WEECHAT_HOTLIST_MESSAGE,
WEECHAT_HOTLIST_PRIVATE, WEECHAT_HOTLIST_HIGHLIGHT, "-1"
// TRANSLATION MISSING
| "+": ホットリストを有効化 (グローバル設定、バッファへのポインタは使われない) +
"-": ホットリストを無効化 (グローバル設定、バッファへのポインタは使われない) +
優先度: この優先度でホットリストにバッファを追加 +
優先度: この優先度でホットリストにバッファを追加
(conditions defined in option _weechat.look.hotlist_add_conditions_
are *NOT* checked) +
"-1": ホットリストからバッファを削除 _(WeeChat バージョン 1.0 以上で利用可)_
| completion_freeze | | "0" または "1"
+4 -1
View File
@@ -13333,9 +13333,12 @@ void weechat_buffer_set (struct t_gui_buffer *buffer, const char *property,
| hotlist | | "+", "-", WEECHAT_HOTLIST_LOW, WEECHAT_HOTLIST_MESSAGE,
WEECHAT_HOTLIST_PRIVATE, WEECHAT_HOTLIST_HIGHLIGHT, "-1"
// TRANSLATION MISSING
| "+": укључује врућу листу (глобално подешавање, не користи се показивач на бафер) +
"-": искључује врућу листу (глобално подешавање, не користи се показивач на бафер) +
приоритет: бафер се на врућу листу додаје са овим приоритетом +
приоритет: бафер се на врућу листу додаје са овим приоритетом
(conditions defined in option _weechat.look.hotlist_add_conditions_
are *NOT* checked) +
"-1": уклања бафер из вруће листе _(WeeChat ≥ 1.0)_.
| completion_freeze | | "0" или "1"
+5 -1
View File
@@ -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;
}
+5 -4
View File
@@ -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++)
+9 -1
View File
@@ -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
View File
@@ -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 */
}
}
}