summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-02-13 21:29:14 +0100
committermathieui <mathieui@mathieui.net>2013-02-13 21:29:14 +0100
commitf4c275eb0787fe3b3ee185610f8a08430cbb2b53 (patch)
treef269411366e578476c5e36f4535aae2b0652481c
parent14183c49c57334b26b52fcf8b6604e70a230535b (diff)
downloadpoezio-f4c275eb0787fe3b3ee185610f8a08430cbb2b53.tar.gz
poezio-f4c275eb0787fe3b3ee185610f8a08430cbb2b53.tar.bz2
poezio-f4c275eb0787fe3b3ee185610f8a08430cbb2b53.tar.xz
poezio-f4c275eb0787fe3b3ee185610f8a08430cbb2b53.zip
Add an indicator of the number of participants
(like in weechat)
-rw-r--r--src/windows.py8
1 files changed, 7 insertions, 1 deletions
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):
"""