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:
@@ -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", "",
|
||||
|
||||
Reference in New Issue
Block a user