mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 01:03:14 +02:00
buflist: add variable "${hotlist_priority_number}" (integer version of "${hotlist_priority}")
This commit is contained in:
@@ -316,6 +316,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
|
||||
int item_index, num_buffers, is_channel, is_private;
|
||||
int i, j, length_max_number, current_buffer, number, prev_number, priority;
|
||||
int rc, count, line_number, line_number_current_buffer;
|
||||
int hotlist_priority_number;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -517,6 +518,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
|
||||
ptr_hotlist_format = weechat_config_string (
|
||||
buflist_config_format_hotlist_level_none);
|
||||
ptr_hotlist_priority = hotlist_priority_none;
|
||||
hotlist_priority_number = -1;
|
||||
if (ptr_hotlist)
|
||||
{
|
||||
priority = weechat_hdata_integer (buflist_hdata_hotlist,
|
||||
@@ -526,12 +528,17 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
|
||||
ptr_hotlist_format = weechat_config_string (
|
||||
buflist_config_format_hotlist_level[priority]);
|
||||
ptr_hotlist_priority = hotlist_priority[priority];
|
||||
hotlist_priority_number = priority;
|
||||
}
|
||||
}
|
||||
weechat_hashtable_set (buflist_hashtable_extra_vars,
|
||||
"color_hotlist", ptr_hotlist_format);
|
||||
weechat_hashtable_set (buflist_hashtable_extra_vars,
|
||||
"hotlist_priority", ptr_hotlist_priority);
|
||||
snprintf (str_number, sizeof (str_number),
|
||||
"%d", hotlist_priority_number);
|
||||
weechat_hashtable_set (buflist_hashtable_extra_vars,
|
||||
"hotlist_priority_number", str_number);
|
||||
str_hotlist = NULL;
|
||||
if (ptr_hotlist)
|
||||
{
|
||||
|
||||
@@ -167,6 +167,8 @@ buflist_command_init ()
|
||||
" - ${hotlist}: the raw hotlist\n"
|
||||
" - ${hotlist_priority}: \"none\", \"low\", \"message\", "
|
||||
"\"private\" or \"highlight\"\n"
|
||||
" - ${hotlist_priority_number}: -1 = none, 0 = low, 1 = message, "
|
||||
"2 = private, 3 = highlight\n"
|
||||
" - ${format_lag}: the lag for an IRC server buffer, empty if "
|
||||
"there's no lag (evaluation of option buflist.format.lag)\n"
|
||||
" - ${format_tls_version}: indicator of TLS version for a server "
|
||||
|
||||
Reference in New Issue
Block a user