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): ...@@ -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 = QAction("Open", self, triggered=self._AH_OpenFile)
self.actions.open_file_folder = QAction("Open File Folder", self, triggered=self._AH_OpenFileFolder) 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.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.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.open_downloads_folder = QAction("Open Downloads Folder", self, triggered=self._AH_OpenDownloadsFolder)
self.actions.clear_list = QAction("Clear List", self, triggered=self._AH_ClearList) self.actions.clear_list = QAction("Clear List", self, triggered=self._AH_ClearList)
...@@ -86,6 +87,8 @@ class FileTransferWindow(base_class, ui_class): ...@@ -86,6 +87,8 @@ class FileTransferWindow(base_class, ui_class):
if not item.failed: if not item.failed:
menu.addAction(self.actions.open_file) menu.addAction(self.actions.open_file)
menu.addAction(self.actions.open_file_folder) menu.addAction(self.actions.open_file_folder)
elif item.direction == 'outgoing':
menu.addAction(self.actions.retry_transfer)
menu.addAction(self.actions.remove_entry) menu.addAction(self.actions.remove_entry)
else: else:
if item.direction == 'outgoing': if item.direction == 'outgoing':
...@@ -114,6 +117,10 @@ class FileTransferWindow(base_class, ui_class): ...@@ -114,6 +117,10 @@ class FileTransferWindow(base_class, ui_class):
item = self.listview.selectedIndexes()[0].data(Qt.UserRole) item = self.listview.selectedIndexes()[0].data(Qt.UserRole)
item.end() item.end()
def _AH_RetryTransfer(self):
item = self.listview.selectedIndexes()[0].data(Qt.UserRole)
item.connect()
def _AH_RemoveEntry(self): def _AH_RemoveEntry(self):
item = self.listview.selectedIndexes()[0].data(Qt.UserRole) item = self.listview.selectedIndexes()[0].data(Qt.UserRole)
self.model.removeItem(item) 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