diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-03-14 10:54:44 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-03-14 10:55:24 +0100 |
commit | a4440ba8e5886f3d0375c840d6147eebbe32a81c (patch) | |
tree | 01b9868c2ac18821ef9e960247a63c46094ab44b /src/plugins | |
parent | 3bdae5b4642ee588c7a01092d7538347fb1a13ab (diff) | |
download | weechat-a4440ba8e5886f3d0375c840d6147eebbe32a81c.zip |
buflist: add buflist bar on configuration reload (issue #1618)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/buflist/buflist-config.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c index a0691da90..0e30d4c37 100644 --- a/src/plugins/buflist/buflist-config.c +++ b/src/plugins/buflist/buflist-config.c @@ -70,6 +70,27 @@ char *buflist_config_format_hotlist_eval = NULL; /* + * Reloads buflist configuration file. + */ + +int +buflist_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); + + buflist_add_bar (); + + return rc; +} + +/* * Frees the signals hooked for refresh. */ @@ -444,8 +465,9 @@ buflist_config_init () { struct t_config_section *ptr_section; - buflist_config_file = weechat_config_new (BUFLIST_CONFIG_NAME, - NULL, NULL, NULL); + buflist_config_file = weechat_config_new ( + BUFLIST_CONFIG_NAME, + &buflist_config_reload, NULL, NULL); if (!buflist_config_file) return 0; |