diff options
author | mathieui <mathieui@mathieui.net> | 2011-05-28 23:51:58 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-05-28 23:51:58 +0200 |
commit | 67881b977954c9cf330ceebc97cd400152b8c550 (patch) | |
tree | 401e4160ae25ab8965516d35d214efaf9509363e | |
parent | 1c9fc655dd9cd662f751742453caae071f88e57b (diff) | |
download | poezio-67881b977954c9cf330ceebc97cd400152b8c550.tar.gz poezio-67881b977954c9cf330ceebc97cd400152b8c550.tar.bz2 poezio-67881b977954c9cf330ceebc97cd400152b8c550.tar.xz poezio-67881b977954c9cf330ceebc97cd400152b8c550.zip |
Fixes #2179
-rw-r--r-- | src/core.py | 2 | ||||
-rw-r--r-- | src/room.py | 3 | ||||
-rw-r--r-- | src/tabs.py | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py index 14cb4857..f96a61a8 100644 --- a/src/core.py +++ b/src/core.py @@ -923,7 +923,7 @@ class Core(object): self.add_message_to_text_buffer(room, _("%(nick)s set the subject to: %(subject)s") % {'nick':nick_from, 'subject':subject}, time=None) else: self.add_message_to_text_buffer(room, _("The subject is: %(subject)s") % {'subject':subject}, time=None) - room.topic = subject.replace('\n', '|') + room.topic = subject if self.get_tab_by_name(room_from, tabs.MucTab) is self.current_tab(): self.refresh_window() diff --git a/src/room.py b/src/room.py index 3ff655fb..a5a05845 100644 --- a/src/room.py +++ b/src/room.py @@ -45,6 +45,9 @@ class Room(TextBuffer): self.users = [] self.joined = False + def get_single_line_topic(self): + return self.topic.replace('\n', '|') + def log_message(self, txt, time, nickname): """ Log the messages in the archives, if it needs diff --git a/src/tabs.py b/src/tabs.py index 0bcc95e9..3c8bfdff 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -709,7 +709,7 @@ class MucTab(ChatTab): if self.need_resize: self.resize() log.debug(' TAB Refresh: %s'%self.__class__.__name__) - self.topic_win.refresh(self._room.topic) + self.topic_win.refresh(self._room.get_single_line_topic()) self.text_win.refresh(self._room) self.v_separator.refresh() self.user_win.refresh(self._room.users) |