summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-08-04 15:28:35 +0200
committermathieui <mathieui@mathieui.net>2013-08-04 15:28:35 +0200
commit416ceddbe498a70d703c46a531d89aeaecb1f5f0 (patch)
tree5f0cde22f297f4214a7998a75c67445c0504656f /src/windows.py
parentd01f6208d67f6c88584fc1f362dae0a9f2d107d0 (diff)
downloadpoezio-416ceddbe498a70d703c46a531d89aeaecb1f5f0.tar.gz
poezio-416ceddbe498a70d703c46a531d89aeaecb1f5f0.tar.bz2
poezio-416ceddbe498a70d703c46a531d89aeaecb1f5f0.tar.xz
poezio-416ceddbe498a70d703c46a531d89aeaecb1f5f0.zip
Add the same pluggable "information element" to the PrivateTab
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index 96c7ee1c..0abbc501 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -467,16 +467,25 @@ class PrivateInfoWin(InfoWin):
def __init__(self):
InfoWin.__init__(self)
- def refresh(self, name, window, chatstate):
+ def refresh(self, name, window, chatstate, informations):
log.debug('Refresh: %s',self.__class__.__name__)
with g_lock:
self._win.erase()
self.write_room_name(name)
self.print_scroll_position(window)
self.write_chatstate(chatstate)
+ self.write_additional_informations(informations, name)
self.finish_line(get_theme().COLOR_INFORMATION_BAR)
self._refresh()
+ def write_additional_informations(self, informations, jid):
+ """
+ Write all informations added by plugins by getting the
+ value returned by the callbacks.
+ """
+ for key in informations:
+ self.addstr(informations[key](jid), to_curses_attr(get_theme().COLOR_INFORMATION_BAR))
+
def write_room_name(self, name):
jid = safeJID(name)
room_name, nick = jid.bare, jid.resource