summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/buflist/buflist-config.c26
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;