summaryrefslogtreecommitdiff
path: root/src/plugins/fset
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-03-14 10:56:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2021-03-14 10:56:24 +0100
commit8c793fe7cc204a99a85b2095e7b41df07405f6a1 (patch)
tree3274d5681834391729f5e3902381d1b40453674c /src/plugins/fset
parent35b5adbc4cab8b0ad3eda491f9261e7e9c312d37 (diff)
downloadweechat-8c793fe7cc204a99a85b2095e7b41df07405f6a1.zip
fset: add fset bar on configuration reload (issue #1618)
Diffstat (limited to 'src/plugins/fset')
-rw-r--r--src/plugins/fset/fset-config.c23
1 files changed, 22 insertions, 1 deletions
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
@@ -101,6 +101,27 @@ 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;