From a2d7ce67aa236fe52d6e860a27950dc7e3a34bd8 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Mon, 16 Apr 2018 20:40:14 +0200 Subject: Merged the new open in explorer button with Silarn's code. --- src/modinfodialog.cpp | 8 ++++++-- src/modinfodialog.h | 1 + src/modinfodialog.ui | 36 +++++++++++++++++++++++++++++++++--- 3 files changed, 40 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index e2da6a2c..705f0019 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -721,7 +721,6 @@ void ModInfoDialog::on_deactivateESP_clicked() void ModInfoDialog::on_visitNexusLabel_linkActivated(const QString &link) { - this->close(); emit nexusLinkActivated(link); } @@ -730,7 +729,7 @@ void ModInfoDialog::linkClicked(const QUrl &url) //Ideally we'd ask the mod for the game and the web service then pass the game //and URL to the web service if (NexusInterface::instance(m_PluginContainer)->isURLGameRelated(url)) { - this->close(); + emit nexusLinkActivated(url.toString()); } else { ::ShellExecuteW(nullptr, L"open", ToWString(url.toString()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); @@ -958,6 +957,11 @@ bool ModInfoDialog::recursiveDelete(const QModelIndex &index) } +void ModInfoDialog::on_openInExplorerButton_clicked() +{ + ::ShellExecuteW(nullptr, L"explore", ToWString(m_ModInfo->absolutePath()).c_str(), nullptr, nullptr, SW_SHOWNORMAL); +} + void ModInfoDialog::deleteFile(const QModelIndex &index) { diff --git a/src/modinfodialog.h b/src/modinfodialog.h index 52db5654..b5cc12a8 100644 --- a/src/modinfodialog.h +++ b/src/modinfodialog.h @@ -172,6 +172,7 @@ private slots: void hideTriggered(); void unhideTriggered(); + void on_openInExplorerButton_clicked(); void on_closeButton_clicked(); void on_saveButton_clicked(); void on_activateESP_clicked(); diff --git a/src/modinfodialog.ui b/src/modinfodialog.ui index 20eb7c30..4352ba4e 100644 --- a/src/modinfodialog.ui +++ b/src/modinfodialog.ui @@ -20,7 +20,7 @@ QTabWidget::Rounded - 0 + 8 true @@ -723,8 +723,8 @@ p, li { white-space: pre-wrap; } - - + + about:blank @@ -779,6 +779,36 @@ p, li { white-space: pre-wrap; } Filetree + + + + + + + 0 + 0 + + + + Open Mod in Explorer + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + -- cgit v1.3.1