From c30abec24d774579db1308b6434d320c53213d89 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Thu, 28 Apr 2016 20:06:02 +0300 Subject: [PATCH] bugs and typo fixes --- docs/install.md | 2 +- src/mainscreen.py | 5 +++++ src/profile.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/install.md b/docs/install.md index 958f06b..679c926 100644 --- a/docs/install.md +++ b/docs/install.md @@ -32,7 +32,7 @@ You can compile Toxygen using [PyInstaller](http://www.pyinstaller.org/): On Linux: -``pyinstaller --windowed src/main.py`` +``pyinstaller --windowed main.py`` On Windows: diff --git a/src/mainscreen.py b/src/mainscreen.py index 9145bce..c272560 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -20,6 +20,9 @@ class MessageArea(QtGui.QPlainTextEdit): self.appendPlainText('') else: self.parent.send_message() + if self.timer.isActive(): + self.timer.stop() + self.parent.profile.send_typing(False) elif event.key() == QtCore.Qt.Key_Up and not self.toPlainText(): self.appendPlainText(Profile.get_instance().get_last_message()) else: @@ -197,6 +200,7 @@ class MainWindow(QtGui.QMainWindow): self.account_avatar.setScaledContents(True) self.account_name = DataLabel(Form) self.account_name.setGeometry(QtCore.QRect(100, 30, 400, 25)) + self.account_name.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse) font = QtGui.QFont() font.setFamily("Times New Roman") font.setPointSize(14) @@ -205,6 +209,7 @@ class MainWindow(QtGui.QMainWindow): self.account_name.setObjectName("account_name") self.account_status = DataLabel(Form) self.account_status.setGeometry(QtCore.QRect(100, 50, 400, 25)) + self.account_status.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse) font.setPointSize(12) font.setBold(False) self.account_status.setFont(font) diff --git a/src/profile.py b/src/profile.py index eee80d9..1b9ec48 100644 --- a/src/profile.py +++ b/src/profile.py @@ -876,6 +876,8 @@ class Profile(Contact, Singleton): :param file_number: file number :param already_cancelled: was cancelled by friend """ + self.get_friend_by_number(friend_number).update_transfer_data(file_number, + FILE_TRANSFER_MESSAGE_STATUS['CANCELLED']) if (friend_number, file_number) in self._file_transfers: tr = self._file_transfers[(friend_number, file_number)] if not already_cancelled: @@ -885,8 +887,6 @@ class Profile(Contact, Singleton): del self._file_transfers[(friend_number, file_number)] else: self._tox.file_control(friend_number, file_number, TOX_FILE_CONTROL['CANCEL']) - self.get_friend_by_number(friend_number).update_transfer_data(file_number, - FILE_TRANSFER_MESSAGE_STATUS['CANCELLED']) def accept_transfer(self, item, path, friend_number, file_number, size, inline=False): """