From 796224d73369e55b278aa1be1a13f357b094e49c Mon Sep 17 00:00:00 2001 From: "Frederik “Freso” S. Olesen" Date: Mon, 6 Aug 2018 12:21:02 +0200 Subject: Add new "Open File" right-click dialog for Downloads This enables the user to directly open the downloaded archived/file which can be useful for e.g., inspection of what's inside or if they need to copy files from inside the archive to somewhere else. Saves a step compared to "Show in Folder" and then opening the file. --- src/downloadlistwidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/downloadlistwidget.cpp') diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp index ad694107..34a90534 100644 --- a/src/downloadlistwidget.cpp +++ b/src/downloadlistwidget.cpp @@ -272,6 +272,11 @@ void DownloadListWidgetDelegate::issueVisitOnNexus() emit visitOnNexus(m_ContextRow); } +void DownloadListWidgetDelegate::issueOpenFile() +{ + emit openFile(m_ContextRow); +} + void DownloadListWidgetDelegate::issueOpenInDownloadsFolder() { emit openInDownloadsFolder(m_ContextRow); @@ -375,6 +380,7 @@ bool DownloadListWidgetDelegate::editorEvent(QEvent *event, QAbstractItemModel * menu.addAction(tr("Visit on Nexus"), this,SLOT(issueVisitOnNexus())); } + menu.addAction(tr("Open File"), this, SLOT(issueOpenFile())); menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder())); menu.addSeparator(); -- cgit v1.3.1