This commit is contained in:
ingvar1995 2016-03-23 23:52:58 +03:00
parent e3f89351ee
commit 3900115d6a
2 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ class FileTransfer(QtCore.QObject):
def cancelled(self):
if hasattr(self, '_file'):
self._file.close()
self._state_changed.signal.emit(TOX_FILE_CONTROL['CANCEL'], self._done / self._size)
self._state_changed.signal.emit(TOX_FILE_CONTROL['CANCEL'], self._done / self._size if self._size else 0)
def send_control(self, control):
if self._tox.file_control(self._friend_number, self._file_number, control):

View file

@ -99,7 +99,7 @@ class MainWindow(QtGui.QMainWindow):
self.fileTransferButton.setGeometry(QtCore.QRect(460, 65, 90, 55))
self.fileTransferButton.setObjectName("fileTransferButton")
self.sendMessageButton = QtGui.QPushButton(Form)
self.sendMessageButton.setGeometry(QtCore.QRect(550, 10, 60, 110))
self.sendMessageButton.setGeometry(QtCore.QRect(550, 10, 70, 110))
self.sendMessageButton.setObjectName("sendMessageButton")
self.sendMessageButton.clicked.connect(self.send_message)
@ -208,7 +208,7 @@ class MainWindow(QtGui.QMainWindow):
def setup_right_center(self, widget):
self.messages = QtGui.QListWidget(widget)
self.messages.setGeometry(0, 0, 600, 250)
self.messages.setGeometry(0, 0, 620, 250)
def initUI(self, tox):
self.setMinimumSize(920, 520)