mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 11:13:12 +02:00
core: resort hotlist on any buffer signal (issue #2097)
This commit is contained in:
+10
-2
@@ -2258,13 +2258,21 @@ gui_bar_item_signal_cb (const void *pointer, void *data,
|
||||
const char *signal,
|
||||
const char *type_data, void *signal_data)
|
||||
{
|
||||
const char *item;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) signal;
|
||||
(void) type_data;
|
||||
(void) signal_data;
|
||||
|
||||
gui_bar_item_update ((char *)pointer);
|
||||
item = (const char *)pointer;
|
||||
if (item)
|
||||
{
|
||||
if (strcmp (item, "hotlist") == 0)
|
||||
gui_hotlist_resort ();
|
||||
gui_bar_item_update (item);
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -2437,7 +2445,7 @@ gui_bar_item_init ()
|
||||
gui_bar_item_new (NULL,
|
||||
gui_bar_item_names[GUI_BAR_ITEM_HOTLIST],
|
||||
&gui_bar_item_hotlist_cb, NULL, NULL);
|
||||
gui_bar_item_hook_signal ("hotlist_changed;buffer_moved;buffer_closed",
|
||||
gui_bar_item_hook_signal ("hotlist_changed;buffer_*",
|
||||
gui_bar_item_names[GUI_BAR_ITEM_HOTLIST]);
|
||||
|
||||
/* completion (possible words when a partial completion occurs) */
|
||||
|
||||
Reference in New Issue
Block a user