diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-05-31 20:25:10 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-05-31 20:25:10 +0200 |
commit | 4592c9438f49fde6675503425b5237c168741895 (patch) | |
tree | 03171c01d7d8378b45295e37c01b58cc0a0079f8 /src/gui/gui-hotlist.c | |
parent | d327e3e75a8392cd62dd98bf9f8b3adfa9aad1e6 (diff) | |
download | weechat-4592c9438f49fde6675503425b5237c168741895.zip |
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.
Diffstat (limited to 'src/gui/gui-hotlist.c')
-rw-r--r-- | src/gui/gui-hotlist.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); } /* |