summaryrefslogtreecommitdiff
path: root/src/plugins/fset
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-02 20:41:03 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-25 16:35:27 +0200
commitcffa55e05ea690d2a90652568ee9cc13344d3716 (patch)
treeb033a54f1e151edb59415e799a6e6211264b9ad1 /src/plugins/fset
parentd5aa8530b7c438036fe8bcc96f999e19caa0e9f8 (diff)
downloadweechat-cffa55e05ea690d2a90652568ee9cc13344d3716.zip
fset: add options fset.color.name_changed and fset.color.name_changed_selected
Diffstat (limited to 'src/plugins/fset')
-rw-r--r--src/plugins/fset/fset-buffer.c6
-rw-r--r--src/plugins/fset/fset-config.c19
-rw-r--r--src/plugins/fset/fset-config.h1
3 files changed, 24 insertions, 2 deletions
diff --git a/src/plugins/fset/fset-buffer.c b/src/plugins/fset/fset-buffer.c
index eea256e35..fd89da098 100644
--- a/src/plugins/fset/fset-buffer.c
+++ b/src/plugins/fset/fset-buffer.c
@@ -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);
diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c
index 63ee5c5ba..866a3561a 100644
--- a/src/plugins/fset/fset-config.c
+++ b/src/plugins/fset/fset-config.c
@@ -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"),
diff --git a/src/plugins/fset/fset-config.h b/src/plugins/fset/fset-config.h
index 7e60afc96..305f7c8c4 100644
--- a/src/plugins/fset/fset-config.h
+++ b/src/plugins/fset/fset-config.h
@@ -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];