mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
fset: remove option fset.look.show_help_bar
This commit is contained in:
@@ -41,8 +41,7 @@ struct t_gui_bar_item *fset_bar_item_fset = NULL;
|
||||
void
|
||||
fset_bar_item_update ()
|
||||
{
|
||||
if (weechat_config_boolean (fset_config_look_show_help_bar))
|
||||
weechat_bar_item_update (FSET_BAR_ITEM_NAME);
|
||||
weechat_bar_item_update (FSET_BAR_ITEM_NAME);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -950,23 +950,23 @@ fset_buffer_input_cb (const void *pointer, void *data,
|
||||
const char *input_data)
|
||||
{
|
||||
char *actions[][2] = {
|
||||
{ "<<", "/fset -go 0" },
|
||||
{ ">>", "/fset -go end" },
|
||||
{ "<", "/fset -left" },
|
||||
{ ">", "/fset -right" },
|
||||
{ "t", "/fset -toggle" },
|
||||
{ "-", "/fset -add -1" },
|
||||
{ "+", "/fset -add 1" },
|
||||
{ "r", "/fset -reset" },
|
||||
{ "u", "/fset -unset" },
|
||||
{ "s", "/fset -set" },
|
||||
{ "n", "/fset -setnew" },
|
||||
{ "a", "/fset -append" },
|
||||
{ ",", "/fset -mark 1" },
|
||||
{ "p", "/mute /set fset.look.show_plugins_desc toggle", },
|
||||
{ "v", "/mute /set fset.look.show_help_bar toggle" },
|
||||
{ "x", "/fset -format" },
|
||||
{ NULL, NULL },
|
||||
{ "<<", "/fset -go 0" },
|
||||
{ ">>", "/fset -go end" },
|
||||
{ "<", "/fset -left" },
|
||||
{ ">", "/fset -right" },
|
||||
{ "t", "/fset -toggle" },
|
||||
{ "-", "/fset -add -1" },
|
||||
{ "+", "/fset -add 1" },
|
||||
{ "r", "/fset -reset" },
|
||||
{ "u", "/fset -unset" },
|
||||
{ "s", "/fset -set" },
|
||||
{ "n", "/fset -setnew" },
|
||||
{ "a", "/fset -append" },
|
||||
{ ",", "/fset -mark 1" },
|
||||
{ "p", "/mute /set fset.look.show_plugins_desc toggle" },
|
||||
{ "v", "/bar toggle " FSET_BAR_NAME },
|
||||
{ "x", "/fset -format" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
const char *ptr_input;
|
||||
int i;
|
||||
@@ -1121,29 +1121,29 @@ void
|
||||
fset_buffer_set_keys ()
|
||||
{
|
||||
char *keys[][2] = {
|
||||
{ "meta2-A", "/fset -up" },
|
||||
{ "meta2-B", "/fset -down" },
|
||||
{ "meta-meta2-1~", "/fset -go 0" },
|
||||
{ "meta-meta2-4~", "/fset -go end" },
|
||||
{ "meta2-23~", "/fset -left" },
|
||||
{ "meta2-24~", "/fset -right" },
|
||||
{ "meta-space", "/fset -toggle" },
|
||||
{ "meta--", "/fset -add -1" },
|
||||
{ "meta-+", "/fset -add 1" },
|
||||
{ "meta-fmeta-r", "/fset -reset" },
|
||||
{ "meta-fmeta-u", "/fset -unset" },
|
||||
{ "meta-ctrl-J", "/fset -set" },
|
||||
{ "meta-ctrl-M", "/fset -set" },
|
||||
{ "meta-fmeta-n", "/fset -setnew" },
|
||||
{ "meta-fmeta-a", "/fset -append" },
|
||||
{ "meta-,", "/fset -mark" },
|
||||
{ "meta2-a", "/fset -up; /fset -mark" },
|
||||
{ "meta2-b", "/fset -mark; /fset -down" },
|
||||
{ "ctrl-L", "/fset -refresh" },
|
||||
{ "meta-p", "/mute /set fset.look.show_plugins_desc toggle", },
|
||||
{ "meta-v", "/mute /set fset.look.show_help_bar toggle" },
|
||||
{ "ctrl-X", "/fset -format" },
|
||||
{ NULL, NULL },
|
||||
{ "meta2-A", "/fset -up" },
|
||||
{ "meta2-B", "/fset -down" },
|
||||
{ "meta-meta2-1~", "/fset -go 0" },
|
||||
{ "meta-meta2-4~", "/fset -go end" },
|
||||
{ "meta2-23~", "/fset -left" },
|
||||
{ "meta2-24~", "/fset -right" },
|
||||
{ "meta-space", "/fset -toggle" },
|
||||
{ "meta--", "/fset -add -1" },
|
||||
{ "meta-+", "/fset -add 1" },
|
||||
{ "meta-fmeta-r", "/fset -reset" },
|
||||
{ "meta-fmeta-u", "/fset -unset" },
|
||||
{ "meta-ctrl-J", "/fset -set" },
|
||||
{ "meta-ctrl-M", "/fset -set" },
|
||||
{ "meta-fmeta-n", "/fset -setnew" },
|
||||
{ "meta-fmeta-a", "/fset -append" },
|
||||
{ "meta-,", "/fset -mark" },
|
||||
{ "meta2-a", "/fset -up; /fset -mark" },
|
||||
{ "meta2-b", "/fset -mark; /fset -down" },
|
||||
{ "ctrl-L", "/fset -refresh" },
|
||||
{ "meta-p", "/mute /set fset.look.show_plugins_desc toggle" },
|
||||
{ "meta-v", "/bar toggle " FSET_BAR_NAME },
|
||||
{ "ctrl-X", "/fset -format" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
char str_key[64];
|
||||
int i;
|
||||
|
||||
@@ -40,7 +40,6 @@ struct t_config_option *fset_config_look_export_help_default;
|
||||
struct t_config_option *fset_config_look_format_number;
|
||||
struct t_config_option *fset_config_look_marked_string;
|
||||
struct t_config_option *fset_config_look_scroll_horizontal;
|
||||
struct t_config_option *fset_config_look_show_help_bar;
|
||||
struct t_config_option *fset_config_look_show_plugins_desc;
|
||||
struct t_config_option *fset_config_look_sort;
|
||||
struct t_config_option *fset_config_look_unmarked_string;
|
||||
@@ -116,22 +115,6 @@ fset_config_change_format_number_cb (const void *pointer, void *data,
|
||||
fset_buffer_check_line_outside_window ();
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option "fset.look.show_help_bar".
|
||||
*/
|
||||
|
||||
void
|
||||
fset_config_change_show_help_bar_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
weechat_command (NULL, "/window refresh");
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option "fset.look.show_plugins_desc".
|
||||
*/
|
||||
@@ -404,15 +387,6 @@ fset_config_init ()
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
fset_config_look_show_help_bar = weechat_config_new_option (
|
||||
fset_config_file, ptr_section,
|
||||
"show_help_bar", "boolean",
|
||||
N_("display help bar in fset buffer (description of option, "
|
||||
"allowed values and default value)"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&fset_config_change_show_help_bar_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
fset_config_look_show_plugins_desc = weechat_config_new_option (
|
||||
fset_config_file, ptr_section,
|
||||
"show_plugins_desc", "boolean",
|
||||
|
||||
@@ -30,7 +30,6 @@ extern struct t_config_option *fset_config_look_export_help_default;
|
||||
extern struct t_config_option *fset_config_look_format_number;
|
||||
extern struct t_config_option *fset_config_look_marked_string;
|
||||
extern struct t_config_option *fset_config_look_scroll_horizontal;
|
||||
extern struct t_config_option *fset_config_look_show_help_bar;
|
||||
extern struct t_config_option *fset_config_look_show_plugins_desc;
|
||||
extern struct t_config_option *fset_config_look_sort;
|
||||
extern struct t_config_option *fset_config_look_unmarked_string;
|
||||
|
||||
@@ -59,8 +59,7 @@ fset_add_bar ()
|
||||
{
|
||||
weechat_bar_new (
|
||||
FSET_BAR_NAME, "off", "0", "window",
|
||||
"${fset.look.show_help_bar} "
|
||||
"&& ${buffer.full_name} == " FSET_PLUGIN_NAME "." FSET_BAR_NAME,
|
||||
"${buffer.full_name} == " FSET_PLUGIN_NAME "." FSET_BAR_NAME,
|
||||
"top", "horizontal", "vertical", "3", "3",
|
||||
"default", "cyan", "default", "on",
|
||||
FSET_BAR_ITEM_NAME);
|
||||
@@ -101,8 +100,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
fset_completion_init ();
|
||||
|
||||
if (weechat_config_boolean (fset_config_look_show_help_bar))
|
||||
fset_add_bar ();
|
||||
fset_add_bar ();
|
||||
|
||||
fset_bar_item_update ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user