summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-26 14:59:27 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-26 14:59:27 +0100
commitce70407363b9bdd8d7901467f2bdb91179a9ac22 (patch)
treee498280edf12556388de55fd4da18643c1e5ab66 /application
parentdccf9d7219282725967c2305502d7ff98e8cbc62 (diff)
downloadMultiMC-ce70407363b9bdd8d7901467f2bdb91179a9ac22.tar
MultiMC-ce70407363b9bdd8d7901467f2bdb91179a9ac22.tar.gz
MultiMC-ce70407363b9bdd8d7901467f2bdb91179a9ac22.tar.lz
MultiMC-ce70407363b9bdd8d7901467f2bdb91179a9ac22.tar.xz
MultiMC-ce70407363b9bdd8d7901467f2bdb91179a9ac22.zip
NOISSUE add button for opening the config folder from mods pages
Diffstat (limited to 'application')
-rw-r--r--application/pages/ModFolderPage.cpp5
-rw-r--r--application/pages/ModFolderPage.h3
-rw-r--r--application/pages/ModFolderPage.ui11
-rw-r--r--application/pages/ResourcePackPage.h2
-rw-r--r--application/pages/TexturePackPage.h2
5 files changed, 22 insertions, 1 deletions
diff --git a/application/pages/ModFolderPage.cpp b/application/pages/ModFolderPage.cpp
index 4ab6ac3d..bc8b8300 100644
--- a/application/pages/ModFolderPage.cpp
+++ b/application/pages/ModFolderPage.cpp
@@ -185,6 +185,11 @@ void ModFolderPage::on_rmModBtn_clicked()
m_mods->deleteMods(selection.indexes());
}
+void ModFolderPage::on_configFolderBtn_clicked()
+{
+ DesktopServices::openDirectory(m_inst->instanceConfigFolder(), true);
+}
+
void ModFolderPage::on_viewModBtn_clicked()
{
DesktopServices::openDirectory(m_mods->dir().absolutePath(), true);
diff --git a/application/pages/ModFolderPage.h b/application/pages/ModFolderPage.h
index 1c2710f6..9d77ba2a 100644
--- a/application/pages/ModFolderPage.h
+++ b/application/pages/ModFolderPage.h
@@ -69,7 +69,7 @@ protected:
protected:
BaseInstance *m_inst;
-private:
+protected:
Ui::ModFolderPage *ui;
std::shared_ptr<ModList> m_mods;
QSortFilterProxyModel *m_filterModel;
@@ -92,6 +92,7 @@ slots:
void on_viewModBtn_clicked();
void on_enableModBtn_clicked();
void on_disableModBtn_clicked();
+ void on_configFolderBtn_clicked();
};
class CoreModFolderPage : public ModFolderPage
diff --git a/application/pages/ModFolderPage.ui b/application/pages/ModFolderPage.ui
index 4c79e1fa..b5597bdc 100644
--- a/application/pages/ModFolderPage.ui
+++ b/application/pages/ModFolderPage.ui
@@ -70,6 +70,16 @@
</widget>
</item>
<item>
+ <widget class="QPushButton" name="configFolderBtn">
+ <property name="toolTip">
+ <string>Open the 'config' folder in the system file manager.</string>
+ </property>
+ <property name="text">
+ <string>View configs</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -162,6 +172,7 @@
<tabstop>rmModBtn</tabstop>
<tabstop>enableModBtn</tabstop>
<tabstop>disableModBtn</tabstop>
+ <tabstop>configFolderBtn</tabstop>
<tabstop>viewModBtn</tabstop>
</tabstops>
<resources/>
diff --git a/application/pages/ResourcePackPage.h b/application/pages/ResourcePackPage.h
index d79590df..19dc78da 100644
--- a/application/pages/ResourcePackPage.h
+++ b/application/pages/ResourcePackPage.h
@@ -1,5 +1,6 @@
#pragma once
#include "ModFolderPage.h"
+#include "ui_ModFolderPage.h"
class ResourcePackPage : public ModFolderPage
{
@@ -8,6 +9,7 @@ public:
: ModFolderPage(instance, instance->resourcePackList(), "resourcepacks",
"resourcepacks", tr("Resource packs"), "Resource-packs", parent)
{
+ ui->configFolderBtn->setHidden(true);
}
virtual ~ResourcePackPage() {}
diff --git a/application/pages/TexturePackPage.h b/application/pages/TexturePackPage.h
index 3c5c27d7..b03614f0 100644
--- a/application/pages/TexturePackPage.h
+++ b/application/pages/TexturePackPage.h
@@ -1,5 +1,6 @@
#pragma once
#include "ModFolderPage.h"
+#include "ui_ModFolderPage.h"
class TexturePackPage : public ModFolderPage
{
@@ -8,6 +9,7 @@ public:
: ModFolderPage(instance, instance->texturePackList(), "texturepacks", "resourcepacks",
tr("Texture packs"), "Texture-packs", parent)
{
+ ui->configFolderBtn->setHidden(true);
}
virtual ~TexturePackPage() {}
virtual bool shouldDisplay() const override