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.setObjectName("sendMessageButton")
|
||||||
self.sendMessageButton.clicked.connect(self.send_message)
|
self.sendMessageButton.clicked.connect(self.send_message)
|
||||||
self.fileTransferButton.clicked.connect(self.send_file)
|
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.screenshotButton.setText(QtGui.QApplication.translate("Form", "Screenshot", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.fileTransferButton.setText(QtGui.QApplication.translate("Form", "File", 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))
|
self.sendMessageButton.setText(QtGui.QApplication.translate("Form", "Send", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
@ -282,6 +283,11 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
if name[0]:
|
if name[0]:
|
||||||
self.profile.send_file(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
|
# 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']:
|
if settings['allow_auto_accept'] and friend.tox_id in settings['auto_accept_from_friends']:
|
||||||
path = settings['auto_accept_path'] or curr_directory()
|
path = settings['auto_accept_path'] or curr_directory()
|
||||||
self.accept_transfer(path + '/' + file_name.decode('utf-8'), friend_number, file_number)
|
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:
|
else:
|
||||||
item = self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, True)
|
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))
|
|
||||||
|
|
||||||
def cancel_transfer(self, friend_number, file_number):
|
def cancel_transfer(self, friend_number, file_number):
|
||||||
if (friend_number, file_number) in self._file_transfers:
|
if (friend_number, file_number) in self._file_transfers:
|
||||||
|
Loading…
Reference in New Issue
Block a user