1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Display MUC name in titlebar

This commit is contained in:
Michael Vetter 2020-01-23 18:53:14 +01:00
parent 036389e8c5
commit 0401412c64

View File

@ -190,7 +190,14 @@ _title_bar_draw(void)
waddch(win, ' ');
}
char *title = win_get_title(current);
char *title;
if (current && current->type == WIN_MUC) {
ProfMucWin *mucwin = (ProfMucWin*) current;
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
title = strdup(mucwin->room_name);
} else {
title = win_get_title(current);
}
mvwprintw(win, 0, 0, " %s", title);
free(title);