Commit ed264752 authored by Dan Pascu's avatar Dan Pascu

Added retry context menu entry for file transfers

parent 4d801019
......@@ -41,6 +41,7 @@ class FileTransferWindow(base_class, ui_class):
self.actions.open_file = QAction("Open", self, triggered=self._AH_OpenFile)
self.actions.open_file_folder = QAction("Open File Folder", self, triggered=self._AH_OpenFileFolder)
self.actions.cancel_transfer = QAction("Cancel", self, triggered=self._AH_CancelTransfer)
self.actions.retry_transfer = QAction("Retry", self, triggered=self._AH_RetryTransfer)
self.actions.remove_entry = QAction("Remove From List", self, triggered=self._AH_RemoveEntry)
self.actions.open_downloads_folder = QAction("Open Downloads Folder", self, triggered=self._AH_OpenDownloadsFolder)
self.actions.clear_list = QAction("Clear List", self, triggered=self._AH_ClearList)
......@@ -86,6 +87,8 @@ class FileTransferWindow(base_class, ui_class):
if not item.failed:
menu.addAction(self.actions.open_file)
menu.addAction(self.actions.open_file_folder)
elif item.direction == 'outgoing':
menu.addAction(self.actions.retry_transfer)
menu.addAction(self.actions.remove_entry)
else:
if item.direction == 'outgoing':
......@@ -114,6 +117,10 @@ class FileTransferWindow(base_class, ui_class):
item = self.listview.selectedIndexes()[0].data(Qt.UserRole)
item.end()
def _AH_RetryTransfer(self):
item = self.listview.selectedIndexes()[0].data(Qt.UserRole)
item.connect()
def _AH_RemoveEntry(self):
item = self.listview.selectedIndexes()[0].data(Qt.UserRole)
self.model.removeItem(item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment