From ad8d892aa1608dc76e3e29de70911953169b91d3 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Thu, 10 Jun 2010 12:56:11 +0000 Subject: [PATCH] fixed #1106 --- src/gui.py | 4 ++-- src/room.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui.py b/src/gui.py index 65df0fb2..12e31a9a 100644 --- a/src/gui.py +++ b/src/gui.py @@ -313,7 +313,7 @@ Avail: Sets your availability to available and (optional) sets your status self.window.text_win.refresh(self.current_room()) def scroll_page_up(self, args=None): - self.current_room().scroll_up() + self.current_room().scroll_up(self.window.size) self.window.text_win.refresh(self.current_room()) def room_error(self, room, error, msg): @@ -786,7 +786,7 @@ Avail: Sets your availability to available and (optional) sets your status """ room = self.current_room() if len(args) == 0: - self.add_message_to_room(room, _("The subject of the topic is: %s") % room.topic) + self.add_message_to_room(room, _("The subject of the room is: %s") % room.topic) subject = ' '.join(args) if not room.joined or room.name == "Info": return diff --git a/src/room.py b/src/room.py index 8dfd63d9..a2b21b58 100644 --- a/src/room.py +++ b/src/room.py @@ -40,8 +40,15 @@ class Room(object): self.window = window self.pos = 0 # offset - def scroll_up(self): + def scroll_up(self, y_x): + y, x = y_x + if len(self.messages) <= y: + return self.pos += 14 + from common import debug + debug(str(y_x)) + if self.pos + y >= len(self.messages): + self.pos = len(self.messages) - y+3 def scroll_down(self): self.pos -= 14