From 39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Thu, 24 Jun 2010 00:01:15 +0000 Subject: Fixes blink on key_up key_down. Also do not set a room as 'urgent' when receiving an history message --- src/message.py | 2 +- src/room.py | 6 +++--- src/window.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/message.py b/src/message.py index 8214e3d8..1ce16bd0 100644 --- a/src/message.py +++ b/src/message.py @@ -43,7 +43,7 @@ class Message(object): class Line(object): """ A line, corresponding to ONE row of the text area. - A message is composed of ONE line or more. + A message is composed of ONE line or MORE. Example: Text area limit text area limit diff --git a/src/room.py b/src/room.py index f9dcabfc..f329ea1c 100644 --- a/src/room.py +++ b/src/room.py @@ -68,16 +68,15 @@ class Room(object): user = self.get_user_by_name(nickname) if nickname is not None else None if user: user.set_last_talked(datetime.now()) - time = time if time is not None else datetime.now() color = None - if nickname is not None: + if not time and nickname is not None: if not self.jid: self.set_color_state(12) else: self.set_color_state(15) else: color = 8 - if nickname != self.own_nick and self.joined and nickname is not None: # do the highlight + if not time and nickname != self.own_nick and self.joined and nickname is not None: # do the highlight try: if self.own_nick.encode('utf-8') in txt: self.set_color_state(13) @@ -96,6 +95,7 @@ class Room(object): self.set_color_state(13) color = 2 break + time = time if time is not None else datetime.now() self.messages.append(Message(txt, time, nickname, user, color)) def get_user_by_name(self, nick): diff --git a/src/window.py b/src/window.py index 22709436..c62dd869 100644 --- a/src/window.py +++ b/src/window.py @@ -332,7 +332,7 @@ class Input(Win): if not len(self.history): return self.reset_completion() - self.win.clear() + self.win.erase() if self.histo_pos >= 0: self.histo_pos -= 1 self.text = self.history[self.histo_pos+1] @@ -347,7 +347,7 @@ class Input(Win): if not len(self.history): return self.reset_completion() - self.win.clear() + self.win.erase() if self.histo_pos < len(self.history)-1: self.histo_pos += 1 self.text = self.history[self.histo_pos] -- cgit v1.2.3