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')
|
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)
|
||||||
|
|
||||||
|
@ -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 ''
|
||||||
|
Loading…
Reference in New Issue
Block a user