1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +02:00

core: add themable flag to configuration options

Add an "int themable" field on struct t_config_option. The flag is set
automatically for every CONFIG_OPTION_TYPE_COLOR option, and may be set
explicitly on any other type by suffixing the type argument with
"|themable" in the call to config_file_new_option (e.g. "string|themable"
for a string option whose value contains "${color:...}" references).

Opt in the relevant string options in core and in the buflist, fset, irc,
relay plugins.

The flag is exposed via hdata, infolist, and print_log so scripts and
/debug can read it. This is the foundation for an upcoming /theme
command that will only be allowed to modify themable options.
This commit is contained in:
Sébastien Helleu
2026-07-04 12:46:53 +02:00
parent 5a341c69f5
commit 68d5004e12
15 changed files with 204 additions and 61 deletions
+1 -1
View File
@@ -635,7 +635,7 @@ def config_new_option(config_file: str, section: str, name: str, type: str, desc
"", "",
"", "")
option_str = weechat.config_new_option(config_file, section, "option_str", "string",
option_str = weechat.config_new_option(config_file, section, "option_str", "string|themable",
"My option, type string",
"", 0, 0, "test", "test", 1,
"option_str_check_value_cb", "",