diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-05-25 15:33:53 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-05-25 15:33:53 +0200 |
| commit | ddb40b712edf0676f6083a0ecd5a67509e60e6fe (patch) | |
| tree | c78719dc0feed4cbf77b64aad0e9212f5342af9c /src/downloadlistwidget.cpp | |
| parent | 186f26b71e4597e9999a3d946b0d9497255fc986 (diff) | |
*Avoided some unnecessary refreshes while removing mods.
*Added "Visit on Nexus" menu entry in the downloads tab.
*Added confirmation message when deleting a single download.
*Changed text of messages to more easily distinguish deleting from hiding.
Diffstat (limited to 'src/downloadlistwidget.cpp')
| -rw-r--r-- | src/downloadlistwidget.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp index d7bd01bb..75470056 100644 --- a/src/downloadlistwidget.cpp +++ b/src/downloadlistwidget.cpp @@ -245,7 +245,11 @@ void DownloadListWidgetDelegate::issueQueryInfo() void DownloadListWidgetDelegate::issueDelete()
{
- emit removeDownload(m_ContextRow, true);
+ if (QMessageBox::question(nullptr, tr("Delete Files?"),
+ tr("This will permanently delete the selected download."),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
+ emit removeDownload(m_ContextRow, true);
+ }
}
void DownloadListWidgetDelegate::issueRemoveFromView()
@@ -263,6 +267,11 @@ void DownloadListWidgetDelegate::issueRestoreToViewAll() emit restoreDownload(-1);
}
+void DownloadListWidgetDelegate::issueVisitOnNexus()
+{
+ emit visitOnNexus(m_ContextRow);
+}
+
void DownloadListWidgetDelegate::issueCancel()
{
@@ -281,7 +290,7 @@ void DownloadListWidgetDelegate::issueResume() void DownloadListWidgetDelegate::issueDeleteAll()
{
- if (QMessageBox::question(nullptr, tr("Are you sure?"),
+ if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all finished downloads from this list and from disk."),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-1, true);
@@ -290,7 +299,7 @@ void DownloadListWidgetDelegate::issueDeleteAll() void DownloadListWidgetDelegate::issueDeleteCompleted()
{
- if (QMessageBox::question(nullptr, tr("Are you sure?"),
+ if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all installed downloads from this list and from disk."),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
emit removeDownload(-2, true);
@@ -340,7 +349,12 @@ bool DownloadListWidgetDelegate::editorEvent(QEvent *event, QAbstractItemModel * menu.addAction(tr("Install"), this, SLOT(issueInstall()));
if (m_Manager->isInfoIncomplete(m_ContextRow)) {
menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfo()));
+ }else {
+ menu.addAction(tr("Visit on Nexus"), this,SLOT(issueVisitOnNexus()));
}
+
+ menu.addSeparator();
+
menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
if (hidden) {
menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
|
