screenshot button todo
This commit is contained in:
parent
046a091ed8
commit
6ffa15b4d7
@ -103,6 +103,7 @@ class MainWindow(QtGui.QMainWindow):
|
||||
self.sendMessageButton.setObjectName("sendMessageButton")
|
||||
self.sendMessageButton.clicked.connect(self.send_message)
|
||||
self.fileTransferButton.clicked.connect(self.send_file)
|
||||
self.screenshotButton.clicked.connect(self.send_screenshot)
|
||||
self.screenshotButton.setText(QtGui.QApplication.translate("Form", "Screenshot", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.fileTransferButton.setText(QtGui.QApplication.translate("Form", "File", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.sendMessageButton.setText(QtGui.QApplication.translate("Form", "Send", None, QtGui.QApplication.UnicodeUTF8))
|
||||
@ -282,6 +283,11 @@ class MainWindow(QtGui.QMainWindow):
|
||||
if name[0]:
|
||||
self.profile.send_file(name[0])
|
||||
|
||||
def send_screenshot(self):
|
||||
# TODO: add screenshots support
|
||||
if self.profile.is_active_online(): # active friend exists and online
|
||||
pass
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
# Functions which called when user open context menu in friends list
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
@ -720,10 +720,9 @@ class Profile(Contact, Singleton):
|
||||
if settings['allow_auto_accept'] and friend.tox_id in settings['auto_accept_from_friends']:
|
||||
path = settings['auto_accept_path'] or curr_directory()
|
||||
self.accept_transfer(path + '/' + file_name.decode('utf-8'), friend_number, file_number)
|
||||
item = self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, False)
|
||||
self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, False)
|
||||
else:
|
||||
item = self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, True)
|
||||
friend.append_file_transfer((item, MESSAGE_OWNER['FRIEND'], int(time.time()), 2))
|
||||
self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, True)
|
||||
|
||||
def cancel_transfer(self, friend_number, file_number):
|
||||
if (friend_number, file_number) in self._file_transfers:
|
||||
|
Loading…
Reference in New Issue
Block a user