From e6a0988c6d201010dcce0e447a0a8e8849f42065 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 11 May 2016 19:35:54 +0300 Subject: [PATCH] tooltips --- src/list_items.py | 5 ++++- src/mainscreen.py | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/list_items.py b/src/list_items.py index bd4df31..3077d88 100644 --- a/src/list_items.py +++ b/src/list_items.py @@ -227,7 +227,10 @@ class FileTransferItem(QtGui.QListWidget): def accept_or_pause_transfer(self, friend_number, file_number, size): if self.state == FILE_TRANSFER_MESSAGE_STATUS['INCOMING_NOT_STARTED']: - directory = QtGui.QFileDialog.getExistingDirectory() + directory = QtGui.QFileDialog.getExistingDirectory(self, + QtGui.QApplication.translate("MainWindow", 'Choose folder', None, QtGui.QApplication.UnicodeUTF8), + curr_directory(), + QtGui.QFileDialog.ShowDirsOnly) if directory: pr = profile.Profile.get_instance() pr.accept_transfer(self, directory + '/' + self.saved_name, friend_number, file_number, size) diff --git a/src/mainscreen.py b/src/mainscreen.py index f3d3095..b6a6bbf 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -110,6 +110,10 @@ class MainWindow(QtGui.QMainWindow): self.actionSettings.setText(QtGui.QApplication.translate("MainWindow", "Settings", None, QtGui.QApplication.UnicodeUTF8)) self.audioSettings.setText(QtGui.QApplication.translate("MainWindow", "Audio", None, QtGui.QApplication.UnicodeUTF8)) self.contact_name.setPlaceholderText(QtGui.QApplication.translate("MainWindow", "Find contact", None, QtGui.QApplication.UnicodeUTF8)) + self.screenshotButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Send screenshot", None, QtGui.QApplication.UnicodeUTF8)) + self.fileTransferButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Send file", None, QtGui.QApplication.UnicodeUTF8)) + self.sendMessageButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Send message", None, QtGui.QApplication.UnicodeUTF8)) + self.callButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Start audio call with friend", None, QtGui.QApplication.UnicodeUTF8)) def setup_right_bottom(self, Form): Form.setObjectName("right_bottom") @@ -382,7 +386,8 @@ class MainWindow(QtGui.QMainWindow): def send_file(self): if self.profile.is_active_online(): # active friend exists and online - choose_file = QtGui.QApplication.translate("MainWindow", 'Choose file', None, QtGui.QApplication.UnicodeUTF8) + text = QtGui.QApplication.translate("MainWindow", 'Choose file', None, QtGui.QApplication.UnicodeUTF8) + choose_file = QtGui.QApplication.translate("MainWindow", text, None, QtGui.QApplication.UnicodeUTF8) choose = QtGui.QApplication.translate("MainWindow", choose_file, None, QtGui.QApplication.UnicodeUTF8) name = QtGui.QFileDialog.getOpenFileName(self, choose) if name[0]: