From a46991ea5427aff5b96a79e8cd5fd513f23d7ff2 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Mon, 21 Jun 2010 08:38:48 +0000 Subject: [PATCH] fixed 1502 --- src/gui.py | 13 +++++++++---- src/window.py | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gui.py b/src/gui.py index bbe658fc..7437e659 100644 --- a/src/gui.py +++ b/src/gui.py @@ -250,11 +250,11 @@ class Gui(object): def scroll_page_down(self, args=None): self.current_room().scroll_down() - self.window.text_win.refresh(self.current_room()) + self.window.refresh(self.rooms) def scroll_page_up(self, args=None): self.current_room().scroll_up(self.window.size) - self.window.text_win.refresh(self.current_room()) + self.window.refresh(self.rooms) def room_error(self, room, error, msg): """ @@ -273,6 +273,7 @@ class Gui(object): {'msg':msg, 'code':code, 'body':body})) if code == '401': room.add(_('To provide a password in order to join the room, type "/join / password" (replace "password" by the real password)')) + self.window.refresh(self.rooms) def private_message(self, stanza): """ @@ -350,7 +351,7 @@ class Gui(object): else: date = date if delayed == True else None self.add_message_to_room(room, body, date, nick_from) - self.window.input.refresh() + self.window.refresh(self.rooms) doupdate() def room_presence(self, stanza): @@ -469,7 +470,6 @@ class Gui(object): if room == self.current_room(): self.window.user_win.refresh(room.users) self.window.input.refresh() - self.window.info_win.refresh(self.rooms, self.current_room()) doupdate() def add_message_to_room(self, room, txt, time=None, nickname=None): @@ -482,6 +482,7 @@ class Gui(object): self.window.text_win.refresh(room) else: self.window.info_win.refresh(self.rooms, self.current_room()) + self.window.input.refresh() def execute(self): """ @@ -594,6 +595,9 @@ class Gui(object): nick = r.own_nick else: room = info[0] + # if len(room.split('@')) == 1: # no server is provided, like "/join hello" + # serv = self.current_room().name.split('/')[0] + # room += '@' + self.current_room. r = self.get_room_by_name(room) if len(args) == 2: # a password is provided password = args[1] @@ -807,6 +811,7 @@ class Gui(object): """ room = self.get_room_by_name("Info") self.add_message_to_room(room, msg) + self.window.input.refresh() def command_quit(self, args): """ diff --git a/src/window.py b/src/window.py index 7e2686be..22709436 100644 --- a/src/window.py +++ b/src/window.py @@ -577,7 +577,7 @@ class Window(object): def resize(self, stdscr): """ - Resize the whole tabe. i.e. all its sub-windows + Resize the whole window. i.e. all its sub-windows """ self.size = (self.height, self.width) = stdscr.getmaxyx() if self.height < 10 or self.width < 50: