summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-09 00:23:59 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-09 00:23:59 +0000
commit6b4b32ffc565eb82e48eb5564f1f336eecaef4dc (patch)
tree409e067c1272662be390458eaae87c10b549d457 /src/room.py
parent835527e2d130cd427972cadfc82d10ee36391e52 (diff)
downloadpoezio-6b4b32ffc565eb82e48eb5564f1f336eecaef4dc.tar.gz
poezio-6b4b32ffc565eb82e48eb5564f1f336eecaef4dc.tar.bz2
poezio-6b4b32ffc565eb82e48eb5564f1f336eecaef4dc.tar.xz
poezio-6b4b32ffc565eb82e48eb5564f1f336eecaef4dc.zip
Print a line separator to indicate the new messages. fixed #1487
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/room.py b/src/room.py
index 4e341cbe..28e29b76 100644
--- a/src/room.py
+++ b/src/room.py
@@ -117,6 +117,20 @@ class Room(object):
time = time if time is not None else datetime.now()
self.messages.append(Message(txt, time, nickname, user, color))
+ def remove_line_separator(self):
+ """
+ Remove the line separator
+ """
+ if None in self.messages:
+ self.messages.remove(None)
+
+ def add_line_separator(self):
+ """
+ add a line separator at the end of messages list
+ """
+ if None not in self.messages:
+ self.messages.append(None)
+
def get_user_by_name(self, nick):
for user in self.users:
if user.nick == nick.encode('utf-8'):