]> jfr.im git - irc/weechat/qweechat.git/blobdiff - src/qweechat/buffer.py
Add missing utf-8 decoding for buffer title
[irc/weechat/qweechat.git] / src / qweechat / buffer.py
index fc12d09b78ec39b74fbc334d17769970db6cba4b..79a0e298291eecb95f695c91271824b649b4041a 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
+# Copyright (C) 2011-2012 Sebastien Helleu <flashcode@flashtux.org>
 #
 # This file is part of QWeeChat, a Qt remote GUI for WeeChat.
 #
@@ -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'].decode('utf-8')))
         except:
             self.widget.set_title(None)