diff options
author | James Booth <boothj5@gmail.com> | 2014-12-21 22:39:00 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-12-21 22:39:00 +0000 |
commit | eef7f9cfd4f74b03b6e3ecfe5ef496fbb4e238a8 (patch) | |
tree | 3966a0355da824805810e0efa6246b46bb086f86 /src | |
parent | 0c1bbb63c08e1237dd2a329b6c085fe5ced1f1d7 (diff) | |
download | profani-tty-eef7f9cfd4f74b03b6e3ecfe5ef496fbb4e238a8.tar.gz |
Show nick for title
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/window.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 6a944c7a..76c923af 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -238,7 +238,13 @@ win_get_title(ProfWin *window) if (window->type == WIN_CHAT) { ProfChatWin *chatwin = (ProfChatWin*) window; assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK); - return strdup(chatwin->barejid); + PContact contact = roster_get_contact(chatwin->barejid); + if (contact) { + const char *name = p_contact_name_or_jid(contact); + return strdup(name); + } else { + return strdup(chatwin->barejid); + } } if (window->type == WIN_MUC) { ProfMucWin *mucwin = (ProfMucWin*) window; |