summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-24 00:01:15 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-24 00:01:15 +0000
commit39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf (patch)
treedf379bcb6de6f0ceb96ca34936fa9cdbd83e6de0
parent17368d3d417b294feb44a843acf1e1d92afecb31 (diff)
downloadpoezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.tar.gz
poezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.tar.bz2
poezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.tar.xz
poezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.zip
Fixes blink on key_up key_down. Also do not set a room as 'urgent' when receiving an history message
-rw-r--r--src/message.py2
-rw-r--r--src/room.py6
-rw-r--r--src/window.py4
3 files changed, 6 insertions, 6 deletions
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]