From 0401412c64d1a871d472d8cd5f04c89968027a5b Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 23 Jan 2020 18:53:14 +0100 Subject: [PATCH] Display MUC name in titlebar --- src/ui/titlebar.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 751b06db..87e2fa63 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -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);