NOISSUE add button for opening the config folder from mods pages
This commit is contained in:
parent
dccf9d7219
commit
ce70407363
@ -185,6 +185,11 @@ void ModFolderPage::on_rmModBtn_clicked()
|
|||||||
m_mods->deleteMods(selection.indexes());
|
m_mods->deleteMods(selection.indexes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ModFolderPage::on_configFolderBtn_clicked()
|
||||||
|
{
|
||||||
|
DesktopServices::openDirectory(m_inst->instanceConfigFolder(), true);
|
||||||
|
}
|
||||||
|
|
||||||
void ModFolderPage::on_viewModBtn_clicked()
|
void ModFolderPage::on_viewModBtn_clicked()
|
||||||
{
|
{
|
||||||
DesktopServices::openDirectory(m_mods->dir().absolutePath(), true);
|
DesktopServices::openDirectory(m_mods->dir().absolutePath(), true);
|
||||||
|
@ -69,7 +69,7 @@ protected:
|
|||||||
protected:
|
protected:
|
||||||
BaseInstance *m_inst;
|
BaseInstance *m_inst;
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
Ui::ModFolderPage *ui;
|
Ui::ModFolderPage *ui;
|
||||||
std::shared_ptr<ModList> m_mods;
|
std::shared_ptr<ModList> m_mods;
|
||||||
QSortFilterProxyModel *m_filterModel;
|
QSortFilterProxyModel *m_filterModel;
|
||||||
@ -92,6 +92,7 @@ slots:
|
|||||||
void on_viewModBtn_clicked();
|
void on_viewModBtn_clicked();
|
||||||
void on_enableModBtn_clicked();
|
void on_enableModBtn_clicked();
|
||||||
void on_disableModBtn_clicked();
|
void on_disableModBtn_clicked();
|
||||||
|
void on_configFolderBtn_clicked();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CoreModFolderPage : public ModFolderPage
|
class CoreModFolderPage : public ModFolderPage
|
||||||
|
@ -69,6 +69,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -162,6 +172,7 @@
|
|||||||
<tabstop>rmModBtn</tabstop>
|
<tabstop>rmModBtn</tabstop>
|
||||||
<tabstop>enableModBtn</tabstop>
|
<tabstop>enableModBtn</tabstop>
|
||||||
<tabstop>disableModBtn</tabstop>
|
<tabstop>disableModBtn</tabstop>
|
||||||
|
<tabstop>configFolderBtn</tabstop>
|
||||||
<tabstop>viewModBtn</tabstop>
|
<tabstop>viewModBtn</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ModFolderPage.h"
|
#include "ModFolderPage.h"
|
||||||
|
#include "ui_ModFolderPage.h"
|
||||||
|
|
||||||
class ResourcePackPage : public ModFolderPage
|
class ResourcePackPage : public ModFolderPage
|
||||||
{
|
{
|
||||||
@ -8,6 +9,7 @@ public:
|
|||||||
: ModFolderPage(instance, instance->resourcePackList(), "resourcepacks",
|
: ModFolderPage(instance, instance->resourcePackList(), "resourcepacks",
|
||||||
"resourcepacks", tr("Resource packs"), "Resource-packs", parent)
|
"resourcepacks", tr("Resource packs"), "Resource-packs", parent)
|
||||||
{
|
{
|
||||||
|
ui->configFolderBtn->setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ResourcePackPage() {}
|
virtual ~ResourcePackPage() {}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ModFolderPage.h"
|
#include "ModFolderPage.h"
|
||||||
|
#include "ui_ModFolderPage.h"
|
||||||
|
|
||||||
class TexturePackPage : public ModFolderPage
|
class TexturePackPage : public ModFolderPage
|
||||||
{
|
{
|
||||||
@ -8,6 +9,7 @@ public:
|
|||||||
: ModFolderPage(instance, instance->texturePackList(), "texturepacks", "resourcepacks",
|
: ModFolderPage(instance, instance->texturePackList(), "texturepacks", "resourcepacks",
|
||||||
tr("Texture packs"), "Texture-packs", parent)
|
tr("Texture packs"), "Texture-packs", parent)
|
||||||
{
|
{
|
||||||
|
ui->configFolderBtn->setHidden(true);
|
||||||
}
|
}
|
||||||
virtual ~TexturePackPage() {}
|
virtual ~TexturePackPage() {}
|
||||||
virtual bool shouldDisplay() const override
|
virtual bool shouldDisplay() const override
|
||||||
|
Loading…
Reference in New Issue
Block a user