1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

fset: add options fset.color.name_changed and fset.color.name_changed_selected

This commit is contained in:
Sébastien Helleu
2017-06-02 20:41:03 +02:00
parent d5aa8530b7
commit cffa55e05e
3 changed files with 24 additions and 2 deletions
+5 -1
View File
@@ -137,7 +137,11 @@ fset_buffer_display_line (int y, struct t_fset_option *fset_option)
"__name", str_field);
snprintf (str_field, sizeof (str_field),
"%s%s",
weechat_color (weechat_config_string (fset_config_color_name[selected_line])),
weechat_color (
weechat_config_string (
(value_changed) ?
fset_config_color_name_changed[selected_line] :
fset_config_color_name[selected_line])),
(ptr_field) ? ptr_field : "");
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_name", str_field);
+18 -1
View File
@@ -62,6 +62,7 @@ struct t_config_option *fset_config_color_marked[2];
struct t_config_option *fset_config_color_max[2];
struct t_config_option *fset_config_color_min[2];
struct t_config_option *fset_config_color_name[2];
struct t_config_option *fset_config_color_name_changed[2];
struct t_config_option *fset_config_color_parent_name[2];
struct t_config_option *fset_config_color_parent_value[2];
struct t_config_option *fset_config_color_quotes[2];
@@ -514,7 +515,23 @@ fset_config_init ()
NULL, NULL, NULL,
&fset_config_change_color_cb, NULL, NULL,
NULL, NULL, NULL);
fset_config_color_parent_name[0] = weechat_config_new_option (
fset_config_color_name_changed[0] = weechat_config_new_option (
fset_config_file, ptr_section,
"name_changed", "color",
N_("color for name if value is changed"),
NULL, 0, 0, "brown", NULL, 0,
NULL, NULL, NULL,
&fset_config_change_color_cb, NULL, NULL,
NULL, NULL, NULL);
fset_config_color_name_changed[1] = weechat_config_new_option (
fset_config_file, ptr_section,
"name_changed_selected", "color",
N_("color for name if value is changed on the selected line"),
NULL, 0, 0, "yellow", NULL, 0,
NULL, NULL, NULL,
&fset_config_change_color_cb, NULL, NULL,
NULL, NULL, NULL);
fset_config_color_parent_name[0] = weechat_config_new_option (
fset_config_file, ptr_section,
"parent_name", "color",
N_("color for parent name"),
+1
View File
@@ -48,6 +48,7 @@ extern struct t_config_option *fset_config_color_marked[2];
extern struct t_config_option *fset_config_color_max[2];
extern struct t_config_option *fset_config_color_min[2];
extern struct t_config_option *fset_config_color_name[2];
extern struct t_config_option *fset_config_color_name_changed[2];
extern struct t_config_option *fset_config_color_parent_name[2];
extern struct t_config_option *fset_config_color_parent_value[2];
extern struct t_config_option *fset_config_color_quotes[2];