From 8c793fe7cc204a99a85b2095e7b41df07405f6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 14 Mar 2021 10:56:24 +0100 Subject: fset: add fset bar on configuration reload (issue #1618) --- src/plugins/fset/fset-config.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/plugins/fset') diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c index 6d8506278..68063c802 100644 --- a/src/plugins/fset/fset-config.c +++ b/src/plugins/fset/fset-config.c @@ -100,6 +100,27 @@ int fset_config_sort_fields_count = 0; int fset_config_format_option_num_lines[2] = { 1, 1 }; +/* + * Reloads fset configuration file. + */ + +int +fset_config_reload (const void *pointer, void *data, + struct t_config_file *config_file) +{ + int rc; + + /* make C compiler happy */ + (void) pointer; + (void) data; + + rc = weechat_config_reload (config_file); + + fset_add_bar (); + + return rc; +} + /* * Callback for changes on option "fset.look.auto_refresh". */ @@ -345,7 +366,7 @@ fset_config_init () struct t_config_section *ptr_section; fset_config_file = weechat_config_new (FSET_CONFIG_NAME, - NULL, NULL, NULL); + &fset_config_reload, NULL, NULL); if (!fset_config_file) return 0; -- cgit v1.2.3