From 0ee2194d3c247afb14f03b0f4bad332988d858d5 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 25 Sep 2011 15:32:00 +0200 Subject: [PATCH] Backed out changeset e811b4e21013 --- src/core.py | 2 +- src/windows.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/core.py b/src/core.py index b93678ab..5e2566ff 100644 --- a/src/core.py +++ b/src/core.py @@ -390,7 +390,7 @@ class Core(object): if time.time() - self.connection_time > 12: # We do not display messages if we recently logged in self.information("\x193}%s \x195}is \x194}online\x195} (\x190}%s\x195})" % (resource.get_jid().bare, status), "Roster") - self.add_information_message_to_conversation_tab(jid.bare, '\x195}%s is \x194}online' % (jid.bare)) + self.add_information_message_to_conversation_tab(jid.bare, '\x195%s is \x194}online' % (jid.bare)) contact.add_resource(resource) def add_information_message_to_conversation_tab(self, jid, msg): diff --git a/src/windows.py b/src/windows.py index 1bfe49db..2352a82a 100644 --- a/src/windows.py +++ b/src/windows.py @@ -137,13 +137,8 @@ class Win(object): self._win.attron(curses.A_BOLD) if attr_char in string.digits and attr_char != '': color_str = text[next_attr_char+1:text.find('}', next_attr_char)] - try: - self._win.attron(to_curses_attr((int(color_str), -1))) - except: - self._win.attron(to_curses_attr((-1, -1))) - text = text[next_attr_char+1+2:] - else: - text = text[next_attr_char+len(color_str)+2:] + self._win.attron(to_curses_attr((int(color_str), -1))) + text = text[next_attr_char+len(color_str)+2:] else: text = text[next_attr_char+2:] next_attr_char = text.find('\x19')