From 4592c9438f49fde6675503425b5237c168741895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 31 May 2018 20:25:10 +0200 Subject: core: send buffer pointer (when possible) in signal "hotlist_changed" (closes #1133) When a buffer is added or updated in the hotlist, the buffer pointer is sent. When the hotlist is cleared or resorted, the buffer pointer is NULL. --- src/gui/gui-hotlist.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/gui-hotlist.c') diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index fc49ffbdb..182309093 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -59,10 +59,10 @@ int gui_add_hotlist = 1; /* 0 is for temporarily disable */ */ void -gui_hotlist_changed_signal () +gui_hotlist_changed_signal (struct t_gui_buffer *buffer) { (void) hook_signal_send ("hotlist_changed", - WEECHAT_HOOK_SIGNAL_STRING, NULL); + WEECHAT_HOOK_SIGNAL_POINTER, buffer); } /* @@ -382,7 +382,7 @@ gui_hotlist_add (struct t_gui_buffer *buffer, if (ptr_hotlist->priority >= priority) { ptr_hotlist->count[priority]++; - gui_hotlist_changed_signal (); + gui_hotlist_changed_signal (buffer); return ptr_hotlist; } @@ -415,7 +415,7 @@ gui_hotlist_add (struct t_gui_buffer *buffer, gui_hotlist_add_hotlist (&gui_hotlist, &last_gui_hotlist, new_hotlist); - gui_hotlist_changed_signal (); + gui_hotlist_changed_signal (buffer); return new_hotlist; } @@ -471,7 +471,7 @@ gui_hotlist_resort () gui_hotlist = new_hotlist; last_gui_hotlist = last_new_hotlist; - gui_hotlist_changed_signal (); + gui_hotlist_changed_signal (NULL); } /* @@ -510,7 +510,7 @@ gui_hotlist_clear (int level_mask) } if (hotlist_changed) - gui_hotlist_changed_signal (); + gui_hotlist_changed_signal (NULL); } /* @@ -562,7 +562,7 @@ gui_hotlist_remove_buffer (struct t_gui_buffer *buffer, } if (hotlist_changed) - gui_hotlist_changed_signal (); + gui_hotlist_changed_signal (NULL); } /* -- cgit v1.2.3