Remove color codes from topic

This commit is contained in:
Sebastien Helleu 2011-12-24 13:17:31 +01:00
parent 773ee7bb73
commit 54bcac1f1b
2 changed files with 7 additions and 6 deletions

View file

@ -28,6 +28,7 @@ QtCore = qt_compat.import_module('QtCore')
QtGui = qt_compat.import_module('QtGui') QtGui = qt_compat.import_module('QtGui')
from chat import ChatTextEdit from chat import ChatTextEdit
from input import InputLineEdit from input import InputLineEdit
import weechat.color as color
class GenericListWidget(QtGui.QListWidget): class GenericListWidget(QtGui.QListWidget):
@ -161,7 +162,7 @@ class Buffer(QtCore.QObject):
def update_title(self): def update_title(self):
"""Update title.""" """Update title."""
try: try:
self.widget.set_title(self.data['title']) self.widget.set_title(color.remove(self.data['title']))
except: except:
self.widget.set_title(None) self.widget.set_title(None)

View file

@ -163,7 +163,7 @@ class Color():
else: else:
return RE_COLOR.sub(self._convert_color, text) return RE_COLOR.sub(self._convert_color, text)
def remove(self, text): def remove(text):
"""Remove colors in a WeeChat string.""" """Remove colors in a WeeChat string."""
if not text: if not text:
return '' return ''