summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAl12rs <gabriel.cortesi@outlook.com>2018-04-16 20:40:14 +0200
committerAl12rs <gabriel.cortesi@outlook.com>2018-04-17 21:49:15 +0200
commita2d7ce67aa236fe52d6e860a27950dc7e3a34bd8 (patch)
treeaf90369ee7bb177d0436e64c9611e61c6a508afb /src
parenta14ed8fcd1f0cb06fb9353a3f672a70251394e2c (diff)
Merged the new open in explorer button with Silarn's code.
Diffstat (limited to 'src')
-rw-r--r--src/modinfodialog.cpp8
-rw-r--r--src/modinfodialog.h1
-rw-r--r--src/modinfodialog.ui36
3 files changed, 40 insertions, 5 deletions
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 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
- <number>0</number>
+ <number>8</number>
</property>
<property name="movable">
<bool>true</bool>
@@ -723,8 +723,8 @@ p, li { white-space: pre-wrap; }
</layout>
</item>
<item>
- <widget class="QWebEngineView" name="descriptionView">
- <property name="url">
+ <widget class="QWebEngineView" name="descriptionView" native="true">
+ <property name="url" stdset="0">
<url>
<string>about:blank</string>
</url>
@@ -780,6 +780,36 @@ p, li { white-space: pre-wrap; }
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
+ <layout class="QHBoxLayout" name="horizontalLayout_13">
+ <item>
+ <widget class="QPushButton" name="openInExplorerButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Open Mod in Explorer</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
<widget class="QTreeView" name="fileTree">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>