From f856173e1fbe1a283df18f3546ad0d36b838a4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 16 Mar 2024 11:32:51 +0100 Subject: [PATCH] core: add option weechat.look.highlight_prefix (closes #2079) --- ChangeLog.adoc | 1 + po/cs.po | 10 ++++++++-- po/de.po | 10 ++++++++-- po/es.po | 10 ++++++++-- po/fr.po | 28 ++++++++++++++++++---------- po/hu.po | 10 ++++++++-- po/it.po | 10 ++++++++-- po/ja.po | 10 ++++++++-- po/pl.po | 10 ++++++++-- po/pt.po | 10 ++++++++-- po/pt_BR.po | 10 ++++++++-- po/ru.po | 10 ++++++++-- po/sr.po | 10 ++++++++-- po/tr.po | 10 ++++++++-- po/weechat.pot | 10 ++++++++-- src/core/core-config.c | 12 +++++++++++- src/core/core-config.h | 1 + src/gui/curses/gui-curses-chat.c | 3 ++- 18 files changed, 137 insertions(+), 38 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4000ebb53..cf1825592 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele New features:: + * core: add option weechat.look.highlight_prefix (issue #2079) * core: add variable `${highlight}` in option weechat.look.buffer_time_format (issue #2079) * core: convert option weechat.look.hotlist_sort to a list of fields (issue #2097) * core: rename variables with creation time in hdata "hotlist": "creation_time.tv_sec" to "time" and "creation_time.tv_usec" to "time_usec" diff --git a/po/cs.po b/po/cs.po index c9520386b..b317b3447 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -4284,7 +4284,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4485,6 +4486,11 @@ msgstr "" "na rozeznávání dle velikosti), například: \"flashcode|flashy\", \"(?-" "i)FlashCode|flashy\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/de.po b/po/de.po index 13c0a8659..086ef5f31 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-07 11:51+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -4815,7 +4815,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -5053,6 +5054,11 @@ msgstr "" "und Kleinschreibung zu beachten), Beispiele: \"\", \"(?-i)\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/es.po b/po/es.po index 97e5d8083..fa9541166 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -4401,7 +4401,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4610,6 +4611,11 @@ msgstr "" "las mayúsculas (usa \"(?-i)\" al principio para cambiarlo), ejemplos: " "\"FlashCode|flashy\", \"(?-i)Flascode|flashy\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression used to check if a message has highlight " diff --git a/po/fr.po b/po/fr.po index cade61189..c902c586c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" -"PO-Revision-Date: 2024-03-16 09:39+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" +"PO-Revision-Date: 2024-03-16 09:49+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -4700,7 +4700,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4714,13 +4715,13 @@ msgstr "" "Référence API extension) (note : le contenu est évalué, donc vous pouvez " "utiliser des couleurs avec le format \"${color:xxx}\", voir /help eval) ; la " "variable \"${highlight}\" peut être utilisée dans une condition pour avoir " -"un format spécifique aux lignes avec highlight ; par exemple l'heure avec " -"des niveaux de gris : \"${color:252}%H${color:243}%M${color:237}%S\", le " -"même format avec des millisecondes : " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", fond rouge in cas de " -"highlight : \"${if:${highlight}?${color:,red}}%H:%M:%S\", fond rouge en cas " -"de highlight avec des niveaux de gris : \"${if:${highlight}?${color:" -"yellow,124}%H${color:187}%M${color:181}%S:" +"un format spécifique aux lignes avec highlight (voir aussi l'option weechat." +"look.highlight_prefix) ; par exemple l'heure avec des niveaux de gris : " +"\"${color:252}%H${color:243}%M${color:237}%S\", le même format avec des " +"millisecondes : \"${color:252}%H${color:243}%M${color:237}%S.%.3\", fond " +"rouge in cas de highlight : \"${if:${highlight}?${color:,red}}%H:%M:%S\", " +"fond rouge en cas de highlight avec des niveaux de gris : \"${if:" +"${highlight}?${color:yellow,124}%H${color:187}%M${color:181}%S:" "${color:252}%H${color:243}%M${color:237}%S}\"" #. TRANSLATORS: string "${color:xxx}" must NOT be translated @@ -4937,6 +4938,13 @@ msgstr "" "insensible à la casse (utilisez \"(?-i)\" au début pour la rendre sensible à " "la casse), exemples : \"\", \"(?-i)\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" +"utiliser une couleur spécifique pour le préfixe de la ligne en cas de " +"highlight (voir aussi l'option weechat.look.buffer_time_format)" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/hu.po b/po/hu.po index 569380480..756c79328 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4083,7 +4083,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4239,6 +4240,11 @@ msgid "" "i)\"" msgstr "" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/it.po b/po/it.po index 683441f79..df3ab1bc7 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -4312,7 +4312,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4520,6 +4521,11 @@ msgstr "" "renderla sensibile alle maiuscole), ad esempio: \"flashcode|flashy\", \"(?-" "i)Flashcode|flashy\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression used to check if a message has highlight " diff --git a/po/ja.po b/po/ja.po index 579b68cd2..96b224bcf 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -4561,7 +4561,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4784,6 +4785,11 @@ msgstr "" "ignoruje wielkość znaków (użyj „(?-i)” na początku, aby wielość znaków nie " "była ignorowana), przykłady: „”, „(?-i)”" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/pt.po b/po/pt.po index 3d67a63d2..836df1192 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -4469,7 +4469,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4699,6 +4700,11 @@ msgstr "" "início para distinguir), exemplos: \"flashcode|flashy\", \"(?-i)FlashCode|" "flash\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/pt_BR.po b/po/pt_BR.po index 3c506adec..a89d8114e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-02-17 10:07+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -4338,7 +4338,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4527,6 +4528,11 @@ msgstr "" "de palavra (alfanumérico, \"-\", \"_\" ou \"|\"), expressões regulares levam " "em conta maiúscula/minúscula, exemplo: \"FlashCode|flashy\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression used to check if a message has highlight " diff --git a/po/ru.po b/po/ru.po index 1c1a021a3..145ca5478 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -4108,7 +4108,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4267,6 +4268,11 @@ msgid "" "i)\"" msgstr "" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/sr.po b/po/sr.po index f8131ce0e..4279c5dbb 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -4575,7 +4575,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4795,6 +4796,11 @@ msgstr "" "слова (употребите „(?-i)” на почетку да се величина слова не узима у обзир), " "примери: „”, „(?-i)”" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/tr.po b/po/tr.po index 7a53f6e18..fb8fa6988 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2024-03-06 20:33+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -4484,7 +4484,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -4700,6 +4701,11 @@ msgstr "" "yapmak için başında \"(?-i)\" kullanın), örneğin: \"\", \"(?-" "i)\"\"" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/po/weechat.pot b/po/weechat.pot index 4d0669ed5..f8c5a4f4d 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"POT-Creation-Date: 2024-03-16 09:48+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -3832,7 +3832,8 @@ msgid "" "util_strftimeval in Plugin API reference) (note: content is evaluated, so " "you can use colors with format \"${color:xxx}\", see /help eval); variable " "\"${highlight}\" can be used in a condition to have a format specific to " -"lines with highlight; for example time using grayscale: " +"lines with highlight (see also option weechat.look.highlight_prefix); for " +"example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " "of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " @@ -3977,6 +3978,11 @@ msgid "" "i)\"" msgstr "" +msgid "" +"use a specific color for prefix of line in case of highlight (see also " +"option weechat.look.buffer_time_format)" +msgstr "" + msgid "" "POSIX extended regular expression used to check if a message has highlight " "or not, at least one match in string must be surrounded by delimiters (chars " diff --git a/src/core/core-config.c b/src/core/core-config.c index 34ef55851..1e7ff82a1 100644 --- a/src/core/core-config.c +++ b/src/core/core-config.c @@ -142,6 +142,7 @@ struct t_config_option *config_look_eat_newline_glitch = NULL; struct t_config_option *config_look_emphasized_attributes = NULL; struct t_config_option *config_look_highlight = NULL; struct t_config_option *config_look_highlight_disable_regex = NULL; +struct t_config_option *config_look_highlight_prefix = NULL; struct t_config_option *config_look_highlight_regex = NULL; struct t_config_option *config_look_highlight_tags = NULL; struct t_config_option *config_look_hotlist_add_conditions = NULL; @@ -3323,7 +3324,7 @@ config_weechat_init_options () "(note: content is evaluated, so you can use colors with format " "\"${color:xxx}\", see /help eval); variable \"${highlight}\" " "can be used in a condition to have a format specific to lines " - "with highlight; " + "with highlight (see also option weechat.look.highlight_prefix); " "for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", " "the same with milliseconds: " @@ -3568,6 +3569,15 @@ config_weechat_init_options () NULL, NULL, NULL, &config_change_highlight_disable_regex, NULL, NULL, NULL, NULL, NULL); + config_look_highlight_prefix = config_file_new_option ( + weechat_config_file, weechat_config_section_look, + "highlight_prefix", "boolean", + N_("use a specific color for prefix of line in case of highlight " + "(see also option weechat.look.buffer_time_format)"), + NULL, 0, 0, "on", NULL, 0, + NULL, NULL, NULL, + &config_change_buffers, NULL, NULL, + NULL, NULL, NULL); config_look_highlight_regex = config_file_new_option ( weechat_config_file, weechat_config_section_look, "highlight_regex", "string", diff --git a/src/core/core-config.h b/src/core/core-config.h index 13989a816..cf556a05e 100644 --- a/src/core/core-config.h +++ b/src/core/core-config.h @@ -199,6 +199,7 @@ extern struct t_config_option *config_look_eat_newline_glitch; extern struct t_config_option *config_look_emphasized_attributes; extern struct t_config_option *config_look_highlight; extern struct t_config_option *config_look_highlight_disable_regex; +extern struct t_config_option *config_look_highlight_prefix; extern struct t_config_option *config_look_highlight_regex; extern struct t_config_option *config_look_highlight_tags; extern struct t_config_option *config_look_hotlist_add_conditions; diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index a7726cc57..62272f463 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -1155,7 +1155,8 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, && gui_line_has_offline_nick (line); prefix_highlighted = NULL; - if (line->data->highlight) + if (line->data->highlight + && CONFIG_BOOLEAN(config_look_highlight_prefix)) { prefix_no_color = gui_color_decode (ptr_prefix, NULL); if (prefix_no_color)