summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-02-24 20:02:18 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-02-24 20:02:18 +0100
commit138b17cdb35da9b31fbea9c61e4a0e5bcab8b87e (patch)
tree3d8fa21b3812f94e94030a4d43d70ae65ff91189 /src/windows.py
parentcc74576c9f5a77128db99468a8432c7de8100302 (diff)
downloadpoezio-138b17cdb35da9b31fbea9c61e4a0e5bcab8b87e.tar.gz
poezio-138b17cdb35da9b31fbea9c61e4a0e5bcab8b87e.tar.bz2
poezio-138b17cdb35da9b31fbea9c61e4a0e5bcab8b87e.tar.xz
poezio-138b17cdb35da9b31fbea9c61e4a0e5bcab8b87e.zip
In normal conversations: Send composing and active chat states
and display the state of the remote contact
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index aab254c0..dc30d541 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -282,7 +282,7 @@ class ConversationInfoWin(InfoWin):
def resize(self, height, width, y, x, stdscr):
self._resize(height, width, y, x, stdscr)
- def refresh(self, jid, contact, text_buffer, window):
+ def refresh(self, jid, contact, text_buffer, window, chatstate):
# contact can be None, if we receive a message
# from someone not in our roster. In this case, we display
# only the maximum information from the message we can get.
@@ -305,6 +305,7 @@ class ConversationInfoWin(InfoWin):
self.write_contact_informations(contact)
self.write_resource_information(resource)
self.print_scroll_position(window)
+ self.write_chatstate(chatstate)
self.finish_line(theme.COLOR_INFORMATION_BAR)
self._refresh()
@@ -339,6 +340,10 @@ class ConversationInfoWin(InfoWin):
self.addstr(jid.full, common.curses_color_pair(theme.COLOR_CONVERSATION_NAME))
self.addstr('] ', common.curses_color_pair(theme.COLOR_INFORMATION_BAR))
+ def write_chatstate(self, state):
+ if state:
+ self.addstr(' %s' % (state,), common.curses_color_pair(theme.COLOR_INFORMATION_BAR))
+
class ConversationStatusMessageWin(InfoWin):
"""
The upper bar displaying the status message of the contact