From f4c275eb0787fe3b3ee185610f8a08430cbb2b53 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 13 Feb 2013 21:29:14 +0100 Subject: Add an indicator of the number of participants (like in weechat) --- src/windows.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/windows.py b/src/windows.py index 63e66cea..2d32da30 100644 --- a/src/windows.py +++ b/src/windows.py @@ -614,6 +614,7 @@ class MucInfoWin(InfoWin): with g_lock: self._win.erase() self.write_room_name(room) + self.write_participants_number(room) self.write_own_nick(room) self.write_disconnected(room) self.write_role(room) @@ -625,7 +626,12 @@ class MucInfoWin(InfoWin): def write_room_name(self, room): self.addstr('[', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) self.addstr(room.name, to_curses_attr(get_theme().COLOR_GROUPCHAT_NAME)) - self.addstr('] ', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) + self.addstr(']', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) + + def write_participants_number(self, room): + self.addstr('{', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) + self.addstr(str(len(room.users)), to_curses_attr(get_theme().COLOR_GROUPCHAT_NAME)) + self.addstr('} ', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) def write_disconnected(self, room): """ -- cgit v1.2.3