fset: add option fset.look.show_plugin_description
This commit is contained in:
parent
ee3d5474b9
commit
f555d588b8
@ -35,6 +35,7 @@ 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_show_plugin_description;
|
||||
struct t_config_option *fset_config_look_use_keys;
|
||||
struct t_config_option *fset_config_look_use_mute;
|
||||
|
||||
@ -83,6 +84,23 @@ fset_config_change_help_bar_cb (const void *pointer, void *data,
|
||||
weechat_command (NULL, "/window refresh");
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option "fset.look.show_plugin_description".
|
||||
*/
|
||||
|
||||
void
|
||||
fset_config_change_show_plugin_description_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (fset_buffer)
|
||||
fset_buffer_refresh (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option "fset.look.use_keys".
|
||||
*/
|
||||
@ -212,6 +230,14 @@ fset_config_init ()
|
||||
NULL, NULL, NULL,
|
||||
&fset_config_change_help_bar_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
fset_config_look_show_plugin_description = weechat_config_new_option (
|
||||
fset_config_file, ptr_section,
|
||||
"show_plugin_description", "boolean",
|
||||
N_("show the plugin description options (plugins.desc.*)"),
|
||||
NULL, 0, 0, "off", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&fset_config_change_show_plugin_description_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
fset_config_look_use_keys = weechat_config_new_option (
|
||||
fset_config_file, ptr_section,
|
||||
"use_keys", "boolean",
|
||||
|
@ -26,6 +26,7 @@ extern struct t_config_file *fset_config_file;
|
||||
|
||||
extern struct t_config_option *fset_config_look_condition_catch_set;
|
||||
extern struct t_config_option *fset_config_look_help_bar;
|
||||
extern struct t_config_option *fset_config_look_show_plugin_description;
|
||||
extern struct t_config_option *fset_config_look_use_keys;
|
||||
extern struct t_config_option *fset_config_look_use_mute;
|
||||
|
||||
|
@ -207,6 +207,13 @@ int
|
||||
fset_option_match_filters (const char *config_name, const char *section_name,
|
||||
struct t_fset_option *fset_option)
|
||||
{
|
||||
if (!weechat_config_boolean (fset_config_look_show_plugin_description)
|
||||
&& (strcmp (config_name, "plugins") == 0)
|
||||
&& (strcmp (section_name, "desc") == 0))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!fset_option_filter || !fset_option_filter[0])
|
||||
return 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user