Remove color codes from topic
This commit is contained in:
parent
773ee7bb73
commit
54bcac1f1b
@ -28,6 +28,7 @@ QtCore = qt_compat.import_module('QtCore')
|
||||
QtGui = qt_compat.import_module('QtGui')
|
||||
from chat import ChatTextEdit
|
||||
from input import InputLineEdit
|
||||
import weechat.color as color
|
||||
|
||||
|
||||
class GenericListWidget(QtGui.QListWidget):
|
||||
@ -161,7 +162,7 @@ class Buffer(QtCore.QObject):
|
||||
def update_title(self):
|
||||
"""Update title."""
|
||||
try:
|
||||
self.widget.set_title(self.data['title'])
|
||||
self.widget.set_title(color.remove(self.data['title']))
|
||||
except:
|
||||
self.widget.set_title(None)
|
||||
|
||||
|
@ -163,7 +163,7 @@ class Color():
|
||||
else:
|
||||
return RE_COLOR.sub(self._convert_color, text)
|
||||
|
||||
def remove(self, text):
|
||||
def remove(text):
|
||||
"""Remove colors in a WeeChat string."""
|
||||
if not text:
|
||||
return ''
|
||||
|
Loading…
Reference in New Issue
Block a user