summaryrefslogtreecommitdiff
path: root/src/plugins/fset/fset-config.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-01 20:53:17 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-25 16:35:27 +0200
commitb2373ffba7bbc13cc6eb2f365ec5badb6ff74d1a (patch)
treeefe4fb52c43565f2d88dde62e9978e929c9e1d76 /src/plugins/fset/fset-config.c
parent2671a72da3c94684bd458c83aa314d0816a79113 (diff)
downloadweechat-b2373ffba7bbc13cc6eb2f365ec5badb6ff74d1a.zip
fset: add mark on options to run an action on multiple options
Diffstat (limited to 'src/plugins/fset/fset-config.c')
-rw-r--r--src/plugins/fset/fset-config.c59
1 files changed, 55 insertions, 4 deletions
diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c
index 1bbe884eb..6621ec0d6 100644
--- a/src/plugins/fset/fset-config.c
+++ b/src/plugins/fset/fset-config.c
@@ -35,7 +35,9 @@ struct t_config_file *fset_config_file = NULL;
struct t_config_option *fset_config_look_condition_catch_set;
struct t_config_option *fset_config_look_help_bar;
+struct t_config_option *fset_config_look_marked_string;
struct t_config_option *fset_config_look_show_plugin_description;
+struct t_config_option *fset_config_look_unmarked_string;
struct t_config_option *fset_config_look_use_keys;
struct t_config_option *fset_config_look_use_mute;
@@ -53,6 +55,7 @@ struct t_config_option *fset_config_color_help_description;
struct t_config_option *fset_config_color_help_name;
struct t_config_option *fset_config_color_help_quotes;
struct t_config_option *fset_config_color_help_string_values;
+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];
@@ -61,6 +64,7 @@ struct t_config_option *fset_config_color_parent_value[2];
struct t_config_option *fset_config_color_quotes[2];
struct t_config_option *fset_config_color_string_values[2];
struct t_config_option *fset_config_color_type[2];
+struct t_config_option *fset_config_color_unmarked[2];
struct t_config_option *fset_config_color_value[2];
struct t_config_option *fset_config_color_value_changed[2];
struct t_config_option *fset_config_color_value_undef[2];
@@ -215,9 +219,7 @@ fset_config_init ()
"with the /set argument); an empty string disables the catch of "
"/set command; with value \"1\", the fset buffer is always used "
"with /set command"),
- NULL, 0, 0,
- "${count} >= 1",
- NULL, 0,
+ NULL, 0, 0, "${count} >= 1", NULL, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
@@ -230,6 +232,15 @@ fset_config_init ()
NULL, NULL, NULL,
&fset_config_change_help_bar_cb, NULL, NULL,
NULL, NULL, NULL);
+ fset_config_look_marked_string = weechat_config_new_option (
+ fset_config_file, ptr_section,
+ "marked_string", "string",
+ N_("string displayed when an option is marked (to do an action on "
+ "multiple options)"),
+ NULL, 0, 0, "*", NULL, 0,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL);
fset_config_look_show_plugin_description = weechat_config_new_option (
fset_config_file, ptr_section,
"show_plugin_description", "boolean",
@@ -238,6 +249,14 @@ fset_config_init ()
NULL, NULL, NULL,
&fset_config_change_show_plugin_description_cb, NULL, NULL,
NULL, NULL, NULL);
+ fset_config_look_unmarked_string = weechat_config_new_option (
+ fset_config_file, ptr_section,
+ "unmarked_string", "string",
+ N_("string displayed when an option is not marked"),
+ NULL, 0, 0, " ", NULL, 0,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL);
fset_config_look_use_keys = weechat_config_new_option (
fset_config_file, ptr_section,
"use_keys", "boolean",
@@ -276,7 +295,7 @@ fset_config_init ()
N_("format of each line with an option "
"(note: content is evaluated, see /help fset)"),
NULL, 0, 0,
- " ${name} ${type} ${value2}",
+ "${marked} ${name} ${type} ${value2}",
NULL, 0,
NULL, NULL, NULL,
&fset_config_change_format, NULL, NULL,
@@ -377,6 +396,22 @@ fset_config_init ()
NULL, NULL, NULL,
&fset_config_change_color, NULL, NULL,
NULL, NULL, NULL);
+ fset_config_color_marked[0] = weechat_config_new_option (
+ fset_config_file, ptr_section,
+ "marked", "color",
+ N_("color for marked string"),
+ NULL, 0, 0, "brown", NULL, 0,
+ NULL, NULL, NULL,
+ &fset_config_change_color, NULL, NULL,
+ NULL, NULL, NULL);
+ fset_config_color_marked[1] = weechat_config_new_option (
+ fset_config_file, ptr_section,
+ "marked_selected", "color",
+ N_("color for marked string on the selected line"),
+ NULL, 0, 0, "yellow", NULL, 0,
+ NULL, NULL, NULL,
+ &fset_config_change_color, NULL, NULL,
+ NULL, NULL, NULL);
fset_config_color_max[0] = weechat_config_new_option (
fset_config_file, ptr_section,
"max", "color",
@@ -505,6 +540,22 @@ fset_config_init ()
NULL, NULL, NULL,
&fset_config_change_color, NULL, NULL,
NULL, NULL, NULL);
+ fset_config_color_unmarked[0] = weechat_config_new_option (
+ fset_config_file, ptr_section,
+ "unmarked", "color",
+ N_("color for unmarked string"),
+ NULL, 0, 0, "default", NULL, 0,
+ NULL, NULL, NULL,
+ &fset_config_change_color, NULL, NULL,
+ NULL, NULL, NULL);
+ fset_config_color_unmarked[1] = weechat_config_new_option (
+ fset_config_file, ptr_section,
+ "unmarked_selected", "color",
+ N_("color for unmarked string on the selected line"),
+ NULL, 0, 0, "white", NULL, 0,
+ NULL, NULL, NULL,
+ &fset_config_change_color, NULL, NULL,
+ NULL, NULL, NULL);
fset_config_color_value[0] = weechat_config_new_option (
fset_config_file, ptr_section,
"value", "color",