From d8433eaf55efe91cb500583da3191d9cfac16069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 4 Jul 2026 13:58:12 +0200 Subject: [PATCH] fset: add "t:themable" filter Extend the "t:" filter so the special value "themable" matches every option whose new themable flag is set, regardless of type (color, string, integer, boolean, enum). This makes the flag interactively discoverable in the fset buffer and is the natural way to inspect the surface area that an upcoming /theme command will be allowed to touch. The themable flag of an option is now mirrored on struct t_fset_option, exposed via hdata ("themable", integer) and infolist ("themable", integer), and printed in the log. --- .poexam/en.dic | 1 + .poexam/fr.dic | 1 + CHANGELOG.md | 1 + po/cs.po | 5 +++-- po/de.po | 11 ++++++++--- po/es.po | 5 +++-- po/fr.po | 11 +++++++---- po/hu.po | 5 +++-- po/it.po | 5 +++-- po/ja.po | 5 +++-- po/pl.po | 14 ++++++++++---- po/pt.po | 5 +++-- po/pt_BR.po | 5 +++-- po/ru.po | 5 +++-- po/sr.po | 28 +++++++++++++++++----------- po/tr.po | 7 ++++--- po/weechat.pot | 5 +++-- src/plugins/fset/fset-command.c | 4 +++- src/plugins/fset/fset-option.c | 15 ++++++++++++++- src/plugins/fset/fset-option.h | 1 + 20 files changed, 94 insertions(+), 45 deletions(-) diff --git a/.poexam/en.dic b/.poexam/en.dic index 6f09ce7c5..e78f71d8b 100644 --- a/.poexam/en.dic +++ b/.poexam/en.dic @@ -235,6 +235,7 @@ sys tThe tcl tg +themable tls tlscertkey toggleautoload diff --git a/.poexam/fr.dic b/.poexam/fr.dic index a82cf8369..bade66fbf 100644 --- a/.poexam/fr.dic +++ b/.poexam/fr.dic @@ -529,6 +529,7 @@ tcl term text tg +themable time timeout timer diff --git a/CHANGELOG.md b/CHANGELOG.md index 99b28be03..c3392d591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ### Added - core: add `themable` flag on configuration options +- fset: add filter `t:themable` - relay/api: add resource `GET /api/scripts` - relay: add option relay.network.unix_socket_permissions ([#2317](https://github.com/weechat/weechat/issues/2317)) - script: add info "script_languages" diff --git a/po/cs.po b/po/cs.po index 761e6afd5..8d73b4d66 100644 --- a/po/cs.po +++ b/po/cs.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-05-30 14:01+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: Czech \n" @@ -7895,7 +7895,8 @@ msgstr "Neznámý konfigurační soubor \"%s\"" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/de.po b/po/de.po index 7c0932e4d..67b406458 100644 --- a/po/de.po +++ b/po/de.po @@ -25,8 +25,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" -"Report-Msgid-Bugs-To: weechatter@arcor.de\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:28+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -9036,9 +9036,14 @@ msgstr "> `xxx`: zeigt nur Optionen mit \"xxx\" im Namen" msgid "> `f:xxx`: show only configuration file \"xxx\"" msgstr "> `f:xxx`: zeigt nur Konfigurationsdatei \"xxx\" an" +#, fuzzy +#| msgid "" +#| "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/" +#| "integer/string/color/enum)" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" "> `t:xxx`: zeigt nur Optionen des entsprechenden Typs, \"xxx\" (bool/int/str/" "col/enum oder boolean/Ganzzahl/Zeichenkette/Farbe/Aufzählung)" diff --git a/po/es.po b/po/es.po index 89c81b6dc..589ba377f 100644 --- a/po/es.po +++ b/po/es.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:46+0200\n" "Last-Translator: Santiago Forero \n" "Language-Team: Spanish \n" @@ -8054,7 +8054,8 @@ msgstr "Archivo de configuración \"%s\" desconocido" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/fr.po b/po/fr.po index d7f396dd7..5a9edbf29 100644 --- a/po/fr.po +++ b/po/fr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" -"PO-Revision-Date: 2026-06-28 08:32+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"PO-Revision-Date: 2026-07-04 12:53+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: French \n" "Language: fr\n" @@ -8887,10 +8887,13 @@ msgstr "> `f:xxx` : afficher seulement le fichier de configuration \"xxx\"" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" "> `t:xxx` : afficher seulement le type \"xxx\" (bool/int/str/col/enum ou " -"boolean/integer/string/color/enum)" +"boolean/integer/string/color/enum) ; la valeur spéciale \"themable\" peut " +"être utilisée pour afficher toutes les options qui peuvent être utilisées " +"dans des thèmes, peu importe le type" msgid "> `d`: show only changed options" msgstr "> `d` : afficher seulement les options changées" diff --git a/po/hu.po b/po/hu.po index 2136cecd4..862fe10e6 100644 --- a/po/hu.po +++ b/po/hu.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: Hungarian \n" @@ -7526,7 +7526,8 @@ msgstr "szerver konfigurációs fájljának újraolvastatása" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/it.po b/po/it.po index 5b40dff7d..6105aaebc 100644 --- a/po/it.po +++ b/po/it.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-05-30 14:02+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: Italian \n" @@ -8060,7 +8060,8 @@ msgstr "File di configurazione \"%s\" sconosciuto" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/ja.po b/po/ja.po index e861a1e3a..3f7aadb95 100644 --- a/po/ja.po +++ b/po/ja.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-05-30 14:02+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -8361,7 +8361,8 @@ msgstr "設定ファイル \"%s\" が見つかりません" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/pl.po b/po/pl.po index ad0f18b44..c14a1fcd7 100644 --- a/po/pl.po +++ b/po/pl.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" -"Report-Msgid-Bugs-To: soltys@soltys.info\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:55+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" @@ -31,7 +31,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 3.8\n" #. TRANSLATORS: command line option "-a", "--no-connect" @@ -8604,9 +8605,14 @@ msgstr "> `xxx`: pokaż tylko opcje z „xxx” w nazwie" msgid "> `f:xxx`: show only configuration file \"xxx\"" msgstr "> `f:xxx`: pokaż tylko plik konfiguracyjny „xxx”" +#, fuzzy +#| msgid "" +#| "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/" +#| "integer/string/color/enum)" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" "> `t:xxx`: pokaż tylko opcje typu „xxx” (bool/int/str/col/enum or boolean/" "integer/string/color/enum)" diff --git a/po/pt.po b/po/pt.po index bf294e102..dff3d94ec 100644 --- a/po/pt.po +++ b/po/pt.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:48+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese \n" @@ -8328,7 +8328,8 @@ msgstr "Ficheiro de configuração desconhecido \"%s\"" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/pt_BR.po b/po/pt_BR.po index cbe8075cd..feced5959 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:49+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: Portuguese (Brazil) \n" @@ -7938,7 +7938,8 @@ msgstr "Arquivo de configuração desconhecido \"%s\"" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/ru.po b/po/ru.po index 88f1b41ad..30eaa86cd 100644 --- a/po/ru.po +++ b/po/ru.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: Russian \n" @@ -7567,7 +7567,8 @@ msgstr "перезагрузить конфигурационный файл с msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/sr.po b/po/sr.po index c052708da..f99d304dc 100644 --- a/po/sr.po +++ b/po/sr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" -"Report-Msgid-Bugs-To: ivan.pesic@gmail.com\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:52+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: Serbian \n" @@ -30,7 +30,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. TRANSLATORS: command line option "-a", "--no-connect" msgid "disable auto-connect to servers at startup" @@ -8596,9 +8597,14 @@ msgstr "> `xxx`: приказивање само опција са „xxx” у msgid "> `f:xxx`: show only configuration file \"xxx\"" msgstr "> `f:xxx`: приказивање само конфигурационог фајла „xxx”" +#, fuzzy +#| msgid "" +#| "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/" +#| "integer/string/color/enum)" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" "> `t:xxx`: приказивање само типа „xxx” (bool/int/str/col/enum или boolean/" "integer/string/color/enum)" @@ -12668,9 +12674,9 @@ msgid "" "%d channels (total: %d) | Filter: %s | Sort: %s | Keys: ctrl+j=join channel " "| Input: $=refresh, s:x,y=sort, words=filter, *=reset filter, q=close buffer" msgstr "" -"%d канала (укупно: %d) | Филтер: %s | Сортирање: %s | Тастери: ctrl+j=" -"приступ каналу | Унос: $=освежавање, s:x,y=сортирање, *=ресет филтера, " -"q=затварање бафера" +"%d канала (укупно: %d) | Филтер: %s | Сортирање: %s | Тастери: " +"ctrl+j=приступ каналу | Унос: $=освежавање, s:x,y=сортирање, *=ресет " +"филтера, q=затварање бафера" msgid "Empty list of channels, try \"$\" to refresh list" msgstr "Празна листа канала, покушајте „$” да освежите листу" @@ -15686,10 +15692,10 @@ msgid "" msgstr "" "листа хеш алгоритама раздвојених запетама који се користе за аутентификацију " "лозинке у „api” и „weechat” протоколима, који могу бити: „plain” (лозинка је " -"чисти текст, не хешира се), „sha256”, „sha512”, „pbkdf2+sha256”, „pbkdf2+" -"sha512”), „*” значи сви алгоритми, име које почиње са „!” је негативна " -"вредност којим се спречава употреба тог алгоритма, у именима је дозвољена " -"употреба џокера „*” (примери: „*”, „pbkdf2*”, „*,!plain”)" +"чисти текст, не хешира се), „sha256”, „sha512”, „pbkdf2+sha256”, " +"„pbkdf2+sha512”), „*” значи сви алгоритми, име које почиње са „!” је " +"негативна вредност којим се спречава употреба тог алгоритма, у именима је " +"дозвољена употреба џокера „*” (примери: „*”, „pbkdf2*”, „*,!plain”)" msgid "" "number of iterations asked to the client in \"api\" and \"weechat\" " diff --git a/po/tr.po b/po/tr.po index b47acd10d..779c71963 100644 --- a/po/tr.po +++ b/po/tr.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" -"Report-Msgid-Bugs-To: emir_sari@icloud.com\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2026-06-28 08:53+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: Turkish \n" @@ -8309,7 +8309,8 @@ msgstr "Bilinmeyen yapılandırma dosyası \"%s\"" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/po/weechat.pot b/po/weechat.pot index bfa08b8a1..78ac0edd8 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-06-23 12:14+0200\n" +"POT-Creation-Date: 2026-07-04 12:53+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -7052,7 +7052,8 @@ msgstr "" msgid "" "> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum or boolean/integer/" -"string/color/enum)" +"string/color/enum); the special value \"themable\" can be used to show all " +"options that can be used in themes, regardless of type" msgstr "" msgid "> `d`: show only changed options" diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index 3b6e7b43c..715b70c94 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -699,7 +699,9 @@ fset_command_init (void) N_("> `xxx`: show only options with \"xxx\" in name"), N_("> `f:xxx`: show only configuration file \"xxx\""), N_("> `t:xxx`: show only type \"xxx\" (bool/int/str/col/enum " - "or boolean/integer/string/color/enum)"), + "or boolean/integer/string/color/enum); the special value " + "\"themable\" can be used to show all options that can be " + "used in themes, regardless of type"), N_("> `d`: show only changed options"), N_("> `d:xxx`: show only changed options with \"xxx\" in " "name"), diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index 2c5a874f8..135a5f478 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -335,6 +335,10 @@ fset_option_match_filter (struct t_fset_option *fset_option, const char *filter) } else if (strncmp (filter, "t:", 2) == 0) { + /* virtual cross-type value: match themable flag (any option type) */ + if (weechat_strcasecmp (filter + 2, "themable") == 0) + return (fset_option->themable) ? 1 : 0; + /* filter by type */ return ( (weechat_strcasecmp ( @@ -426,7 +430,7 @@ fset_option_set_values (struct t_fset_option *fset_option, const char **ptr_string_values; void *ptr_default_value, *ptr_value; struct t_config_option *ptr_parent_option; - int *ptr_type, *ptr_min, *ptr_max; + int *ptr_type, *ptr_themable, *ptr_min, *ptr_max; char str_value[64], str_allowed_values[4096]; /* file */ @@ -466,6 +470,10 @@ fset_option_set_values (struct t_fset_option *fset_option, ptr_type = weechat_config_option_get_pointer (option, "type"); fset_option->type = *ptr_type; + /* themable */ + ptr_themable = weechat_config_option_get_pointer (option, "themable"); + fset_option->themable = (ptr_themable) ? *ptr_themable : 0; + /* default value */ free (fset_option->default_value); fset_option->default_value = NULL; @@ -784,6 +792,7 @@ fset_option_alloc (struct t_config_option *option) new_fset_option->name = NULL; new_fset_option->parent_name = NULL; new_fset_option->type = 0; + new_fset_option->themable = 0; new_fset_option->default_value = NULL; new_fset_option->value = NULL; new_fset_option->parent_value = NULL; @@ -1691,6 +1700,7 @@ fset_option_hdata_option_cb (const void *pointer, void *data, WEECHAT_HDATA_VAR(struct t_fset_option, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_fset_option, parent_name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_fset_option, type, INTEGER, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_fset_option, themable, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_fset_option, default_value, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_fset_option, value, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_fset_option, parent_value, STRING, 0, NULL, NULL); @@ -1740,6 +1750,8 @@ fset_option_add_to_infolist (struct t_infolist *infolist, return 0; if (!weechat_infolist_new_var_string (ptr_item, "type_en", fset_option_type_string[fset_option->type])) return 0; + if (!weechat_infolist_new_var_integer (ptr_item, "themable", fset_option->themable)) + return 0; if (!weechat_infolist_new_var_string (ptr_item, "default_value", fset_option->default_value)) return 0; if (!weechat_infolist_new_var_string (ptr_item, "value", fset_option->value)) @@ -1793,6 +1805,7 @@ fset_option_print_log (void) weechat_log_printf (" type. . . . . . . . . : %d ('%s')", ptr_fset_option->type, fset_option_type_string[ptr_fset_option->type]); + weechat_log_printf (" themable. . . . . . . : %d", ptr_fset_option->themable); weechat_log_printf (" default_value . . . . : '%s'", ptr_fset_option->default_value); weechat_log_printf (" value . . . . . . . . : '%s'", ptr_fset_option->value); weechat_log_printf (" parent_value. . . . . : '%s'", ptr_fset_option->parent_value); diff --git a/src/plugins/fset/fset-option.h b/src/plugins/fset/fset-option.h index 8ad377eb2..0a0cce96a 100644 --- a/src/plugins/fset/fset-option.h +++ b/src/plugins/fset/fset-option.h @@ -46,6 +46,7 @@ struct t_fset_option char *name; /* option full name: file.sect.opt */ char *parent_name; /* parent option name */ enum t_fset_option_type type; /* option type */ + int themable; /* 1 if option is themable */ char *default_value; /* option default value */ char *value; /* option value */ char *parent_value; /* parent option value */