1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 16:53: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 (buffer_time_format,
day_change_message_*, item_time_format, nick_color_force, prefix_*,
chat_nick_colors, eval_syntax_colors, color palette aliases) 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-05-25 22:55:12 +02:00
parent b802681230
commit 25495b6188
7 changed files with 74 additions and 38 deletions
+1 -1
View File
@@ -572,7 +572,7 @@ fset_config_init (void)
NULL, NULL, NULL);
fset_config_format_option[1] = weechat_config_new_option (
fset_config_file, fset_config_section_format,
"option2", "string",
"option2", "string|themable",
N_("second format of each line, used when option "
"fset.look.format_number is set to 2 "
"(note: content is evaluated, see /help fset); "