diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-01-23 18:53:14 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-01-23 18:53:14 +0100 |
commit | 0401412c64d1a871d472d8cd5f04c89968027a5b (patch) | |
tree | f7d8ce494d0edcd4a0b4417d63d70b8edc085693 | |
parent | 036389e8c50c3e207a97d9f1d67efc689a9dce0d (diff) | |
download | profani-tty-0401412c64d1a871d472d8cd5f04c89968027a5b.tar.gz |
Display MUC name in titlebar
-rw-r--r-- | src/ui/titlebar.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |