diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-06 20:49:17 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-06 20:49:17 +0200 |
commit | fdd39c6b97683ad6cdb009e2518baa5d2fc9b16b (patch) | |
tree | fa8bb7af30ceb3861b47ee231ce2bf6f54657009 /src/plugins/buflist/buflist-config.h | |
parent | a072d769fd212f965dd8760168c04f5e2c113a9d (diff) | |
download | weechat-fdd39c6b97683ad6cdb009e2518baa5d2fc9b16b.zip |
buflist: evaluate option buflist.look.sort (closes #1465)
The evaluation allows to use different sort for the bar items, for example with
such value:
${if:${bar_item.name}==buflist?number:short_name}
This sorts by number on the first bar item and by short name on the two other
bar items.
Diffstat (limited to 'src/plugins/buflist/buflist-config.h')
-rw-r--r-- | src/plugins/buflist/buflist-config.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/buflist/buflist-config.h b/src/plugins/buflist/buflist-config.h index a5f387adf..848af87aa 100644 --- a/src/plugins/buflist/buflist-config.h +++ b/src/plugins/buflist/buflist-config.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_PLUGIN_BUFLIST_CONFIG_H #define WEECHAT_PLUGIN_BUFLIST_CONFIG_H +#include "buflist-bar-item.h" + #define BUFLIST_CONFIG_NAME "buflist" #define BUFLIST_CONFIG_SIGNALS_REFRESH \ @@ -56,12 +58,14 @@ extern struct t_config_option *buflist_config_format_name; extern struct t_config_option *buflist_config_format_nick_prefix; extern struct t_config_option *buflist_config_format_number; -extern char **buflist_config_sort_fields; -extern int buflist_config_sort_fields_count; +extern char **buflist_config_sort_fields[BUFLIST_BAR_NUM_ITEMS]; +extern int buflist_config_sort_fields_count[BUFLIST_BAR_NUM_ITEMS]; extern char *buflist_config_format_buffer_eval; extern char *buflist_config_format_buffer_current_eval; extern char *buflist_config_format_hotlist_eval; +extern void buflist_config_change_sort (const void *pointer, void *data, + struct t_config_option *option); extern int buflist_config_init (); extern int buflist_config_read (); extern int buflist_config_write (); |