From a970ea49cd9457b9281466d6e127b8b15a25fd1f Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 14 Nov 2012 01:16:07 +0000 Subject: Treat room presence as online Needs to be changed to show status changes --- src/jabber.c | 2 +- src/windows.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/jabber.c b/src/jabber.c index bdb801c9..86ea3901 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -741,8 +741,8 @@ _room_presence_handler(const char * const jid, xmpp_stanza_t * const stanza) show_str = xmpp_stanza_get_text(show); } else { show_str = "online"; - prof_handle_room_member_online(room, nick, show_str, status_str); } + prof_handle_room_member_online(room, nick, show_str, status_str); } } } diff --git a/src/windows.c b/src/windows.c index 00b77b14..43e6177f 100644 --- a/src/windows.c +++ b/src/windows.c @@ -237,22 +237,31 @@ win_show_wins(void) for (i = 1; i < NUM_WINS; i++) { if (_wins[i].type != WIN_UNUSED) { _win_show_time(_cons_win); - wprintw(_cons_win, "[%d] - ", i + 1); switch (_wins[i].type) { case WIN_CHAT: - wprintw(_cons_win, "conversation : %s\n", _wins[i].from); + wprintw(_cons_win, "[%d] - ", i + 1); + wprintw(_cons_win, "conversation : %s", _wins[i].from); + PContact contact = contact_list_get_contact(_wins[i].from); + if (p_contact_name(contact) != NULL) { + wprintw(_cons_win, " (%s)", p_contact_name(contact)); + } + wprintw(_cons_win, ", %s", p_contact_presence(contact)); break; case WIN_PRIVATE: - wprintw(_cons_win, "private : %s\n", _wins[i].from); + wprintw(_cons_win, "[%d] - ", i + 1); + wprintw(_cons_win, "private : %s", _wins[i].from); break; case WIN_MUC: - wprintw(_cons_win, "chat room : %s\n", _wins[i].from); + wprintw(_cons_win, "[%d] - ", i + 1); + wprintw(_cons_win, "chat room : %s", _wins[i].from); break; default: break; } + + wprintw(_cons_win, "\n"); } } } -- cgit 1.4.1-2-gfad0