From 99f31cc3020e7e430b22bb5b72aa204d21a91c7d Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Thu, 4 Aug 2016 16:11:04 +0300 Subject: [PATCH] utf-8 fix --- toxygen/profile.py | 2 +- toxygen/widgets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 6c391c0..321fc5e 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -824,7 +824,7 @@ class Profile(contact.Contact, Singleton): self.update_filtration() def reconnect(self): - if self.status is None: + if self.status is None or all(list(map(lambda x: x.status is None, self._friends))): self.reset(self._screen.reset) QtCore.QTimer.singleShot(30000, self.reconnect) diff --git a/toxygen/widgets.py b/toxygen/widgets.py index 1e5cfe8..2abc7b7 100644 --- a/toxygen/widgets.py +++ b/toxygen/widgets.py @@ -9,7 +9,7 @@ class DataLabel(QtGui.QLabel): Label with elided text """ def setText(self, text): - text = ''.join(c if c <= '\u10FFFF' else '\u25AF' for c in text) + text = ''.join(c if c <= '\U0010FFFF' else '\u25AF' for c in text) metrics = QtGui.QFontMetrics(self.font()) text = metrics.elidedText(text, QtCore.Qt.ElideRight, self.width()) super().setText(text)