mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
fset: rename options fset.format.option_current* to fset.format.option_selected*
This commit is contained in:
@@ -693,7 +693,7 @@ fset_buffer_display_line (int y, struct t_fset_option *fset_option)
|
||||
format_number = weechat_config_integer (fset_config_look_format_number);
|
||||
line = weechat_string_eval_expression (
|
||||
(selected_line) ?
|
||||
fset_config_eval_format_option_current[format_number - 1] :
|
||||
fset_config_eval_format_option_selected[format_number - 1] :
|
||||
weechat_config_string (fset_config_format_option[format_number - 1]),
|
||||
fset_buffer_hashtable_pointers,
|
||||
fset_buffer_hashtable_extra_vars,
|
||||
|
||||
@@ -648,7 +648,7 @@ fset_command_init ()
|
||||
"(see /help eval for the format), with these options:\n"
|
||||
" - fset.format.option: format for an option which is not on "
|
||||
"current line\n"
|
||||
" - fset.format.option_current: format for the current option\n"
|
||||
" - fset.format.option_selected: format for the selected option\n"
|
||||
"\n"
|
||||
"The following variables can be used in these options:\n"
|
||||
" - option data, with color and padded by spaces on the right:\n"
|
||||
|
||||
@@ -51,7 +51,7 @@ struct t_config_option *fset_config_look_use_mute;
|
||||
/* fset config, format section */
|
||||
|
||||
struct t_config_option *fset_config_format_option[2];
|
||||
struct t_config_option *fset_config_format_option_current[2];
|
||||
struct t_config_option *fset_config_format_option_selected[2];
|
||||
struct t_config_option *fset_config_format_export_help;
|
||||
struct t_config_option *fset_config_format_export_option;
|
||||
struct t_config_option *fset_config_format_export_option_null;
|
||||
@@ -95,7 +95,7 @@ struct t_config_option *fset_config_color_value_undef[2];
|
||||
|
||||
char **fset_config_sort_fields = NULL;
|
||||
int fset_config_sort_fields_count = 0;
|
||||
char *fset_config_eval_format_option_current[2] = { NULL, NULL };
|
||||
char *fset_config_eval_format_option_selected[2] = { NULL, NULL };
|
||||
|
||||
|
||||
/*
|
||||
@@ -228,10 +228,10 @@ fset_config_change_format_cb (const void *pointer, void *data,
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (fset_config_eval_format_option_current[i])
|
||||
free (fset_config_eval_format_option_current[i]);
|
||||
fset_config_eval_format_option_current[i] = weechat_string_replace (
|
||||
weechat_config_string (fset_config_format_option_current[i]),
|
||||
if (fset_config_eval_format_option_selected[i])
|
||||
free (fset_config_eval_format_option_selected[i]);
|
||||
fset_config_eval_format_option_selected[i] = weechat_string_replace (
|
||||
weechat_config_string (fset_config_format_option_selected[i]),
|
||||
"${format_option}",
|
||||
weechat_config_string (fset_config_format_option[i]));
|
||||
}
|
||||
@@ -479,10 +479,10 @@ fset_config_init ()
|
||||
NULL, NULL, NULL,
|
||||
&fset_config_change_format_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
fset_config_format_option_current[0] = weechat_config_new_option (
|
||||
fset_config_format_option_selected[0] = weechat_config_new_option (
|
||||
fset_config_file, ptr_section,
|
||||
"option_current1", "string",
|
||||
N_("first format for the line with current option "
|
||||
"option_selected1", "string",
|
||||
N_("first format for the line with selected option "
|
||||
"(note: content is evaluated, see /help fset, "
|
||||
"${format_option} is replaced by the content of option "
|
||||
"fset.format.option1 before evaluation); "
|
||||
@@ -491,10 +491,10 @@ fset_config_init ()
|
||||
NULL, NULL, NULL,
|
||||
&fset_config_change_format_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
fset_config_format_option_current[1] = weechat_config_new_option (
|
||||
fset_config_format_option_selected[1] = weechat_config_new_option (
|
||||
fset_config_file, ptr_section,
|
||||
"option_current2", "string",
|
||||
N_("second format for the line with current option "
|
||||
"option_selected2", "string",
|
||||
N_("second format for the line with selected option "
|
||||
"(note: content is evaluated, see /help fset, "
|
||||
"${format_option} is replaced by the content of option "
|
||||
"fset.format.option2 before evaluation); "
|
||||
@@ -1072,10 +1072,10 @@ fset_config_free ()
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (fset_config_eval_format_option_current[i])
|
||||
if (fset_config_eval_format_option_selected[i])
|
||||
{
|
||||
free (fset_config_eval_format_option_current[i]);
|
||||
fset_config_eval_format_option_current[i] = NULL;
|
||||
free (fset_config_eval_format_option_selected[i]);
|
||||
fset_config_eval_format_option_selected[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ extern struct t_config_option *fset_config_look_use_keys;
|
||||
extern struct t_config_option *fset_config_look_use_mute;
|
||||
|
||||
extern struct t_config_option *fset_config_format_option[2];
|
||||
extern struct t_config_option *fset_config_format_option_current[2];
|
||||
extern struct t_config_option *fset_config_format_option_selected[2];
|
||||
extern struct t_config_option *fset_config_format_export_help;
|
||||
extern struct t_config_option *fset_config_format_export_option;
|
||||
extern struct t_config_option *fset_config_format_export_option_null;
|
||||
@@ -81,7 +81,7 @@ extern struct t_config_option *fset_config_color_value_undef[2];
|
||||
|
||||
extern char **fset_config_sort_fields;
|
||||
extern int fset_config_sort_fields_count;
|
||||
extern char *fset_config_eval_format_option_current[2];
|
||||
extern char *fset_config_eval_format_option_selected[2];
|
||||
|
||||
extern int fset_config_init ();
|
||||
extern int fset_config_read ();
|
||||
|
||||
Reference in New Issue
Block a user