diff options
-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) |