1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Add setting to choose between window name and visible name in actlist

This commit is contained in:
vague666 2019-03-22 19:10:10 +01:00
parent 26d96a7bb2
commit 22502abf2c

View File

@ -123,7 +123,9 @@ static char *get_activity_list(MAIN_WINDOW_REC *window, int normal, int hilight)
window->hilight_color,
window->refnum);
if (add_name && window->active != NULL)
g_string_append_printf(format, ":%s", window->active->visible_name);
g_string_append_printf(format, ":%s",
settings_get_bool("actlist_prefer_window_name") &&
window->name != NULL ? window->name : window->active->visible_name);
g_string_append_c(format, '}');
value = theme_format_expand(theme, format->str);
@ -470,6 +472,7 @@ void statusbar_items_init(void)
settings_add_time("misc", "lag_min_show", "1sec");
settings_add_str("lookandfeel", "actlist_sort", "refnum");
settings_add_bool("lookandfeel", "actlist_names", FALSE);
settings_add_bool("lookandfeel", "actlist_prefer_window_name", FALSE);
statusbar_item_register("window", NULL, item_window_active);
statusbar_item_register("window_empty", NULL, item_window_empty);