Fix set the title of the thread.

This commit is contained in:
Abhilash Raj 2021-05-31 21:53:54 -07:00
parent b8a96ada1f
commit eedb06f0ed
No known key found for this signature in database
GPG Key ID: 9D9B2BA061D0A67C

View File

@ -19,6 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with QWeeChat. If not, see <http://www.gnu.org/licenses/>.
#
import traceback
from pkg_resources import resource_filename
from qweechat.chat import ChatTextEdit
@ -167,15 +168,17 @@ class Buffer(QtCore.QObject):
"""Update title."""
try:
self.widget.set_title(
color.remove(self.data['title'].decode('utf-8')))
except: # noqa: E722
color.remove(self.data['title']))
except Exception as e: # noqa: E722
# TODO: Debug print the exception to be fixed.
# traceback.print_exc()
self.widget.set_title(None)
def update_prompt(self):
"""Update prompt."""
try:
self.widget.set_prompt(self.data['local_variables']['nick'])
except: # noqa: E722
except Exception as e: # noqa: E722
self.widget.set_prompt(None)
def input_text_sent(self, text):