summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/InstancePageProvider.h16
-rw-r--r--application/pages/ModFolderPage.cpp3
-rw-r--r--application/pages/ModFolderPage.h7
3 files changed, 17 insertions, 9 deletions
diff --git a/application/InstancePageProvider.h b/application/InstancePageProvider.h
index 9cc97c4a..99f69706 100644
--- a/application/InstancePageProvider.h
+++ b/application/InstancePageProvider.h
@@ -32,10 +32,10 @@ public:
if(onesix)
{
values.append(new VersionPage(onesix.get()));
- values.append(new ModFolderPage(onesix.get(), onesix->loaderModList(), "mods", "loadermods",
- tr("Loader mods"), "Loader-mods"));
- values.append(new CoreModFolderPage(onesix.get(), onesix->coreModList(), "coremods", "coremods",
- tr("Core mods"), "Core-mods"));
+ auto modsPage = new ModFolderPage(onesix.get(), onesix->loaderModList(), "mods", "loadermods", tr("Loader mods"), "Loader-mods");
+ modsPage->setFilter(tr("%1 (*.zip *.jar *.litemod)"));
+ values.append(modsPage);
+ values.append(new CoreModFolderPage(onesix.get(), onesix->coreModList(), "coremods", "coremods", tr("Core mods"), "Core-mods"));
values.append(new ResourcePackPage(onesix.get()));
values.append(new TexturePackPage(onesix.get()));
values.append(new NotesPage(onesix.get()));
@@ -50,10 +50,10 @@ public:
// FIXME: actually implement the legacy instance upgrade, then enable this.
//values.append(new LegacyUpgradePage(this));
values.append(new LegacyJarModPage(legacy.get()));
- values.append(new ModFolderPage(legacy.get(), legacy->loaderModList(), "mods", "loadermods", tr("Loader mods"),
- "Loader-mods"));
- values.append(new ModFolderPage(legacy.get(), legacy->coreModList(), "coremods", "coremods", tr("Core mods"),
- "Loader-mods"));
+ auto modsPage = new ModFolderPage(onesix.get(), onesix->loaderModList(), "mods", "loadermods", tr("Loader mods"), "Loader-mods");
+ modsPage->setFilter(tr("%1 (*.zip *.jar *.litemod)"));
+ values.append(modsPage);
+ values.append(new ModFolderPage(legacy.get(), legacy->coreModList(), "coremods", "coremods", tr("Core mods"), "Loader-mods"));
values.append(new TexturePackPage(legacy.get()));
values.append(new NotesPage(legacy.get()));
values.append(new ScreenshotsPage(PathCombine(legacy->minecraftRoot(), "screenshots")));
diff --git a/application/pages/ModFolderPage.cpp b/application/pages/ModFolderPage.cpp
index 16272653..a70c1620 100644
--- a/application/pages/ModFolderPage.cpp
+++ b/application/pages/ModFolderPage.cpp
@@ -45,6 +45,7 @@ ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods,
m_displayName = displayName;
m_iconName = iconName;
m_helpName = helpPage;
+ m_filter = tr("%1 (*.zip *.jar)");
ui->modTreeView->setModel(m_mods.get());
ui->modTreeView->installEventFilter(this);
auto smodel = ui->modTreeView->selectionModel();
@@ -135,7 +136,7 @@ void ModFolderPage::on_addModBtn_clicked()
tr("Select %1",
"Select whatever type of files the page contains. Example: 'Loader Mods'")
.arg(m_displayName),
- tr("%1 (*.zip *.jar)").arg(m_displayName), this->parentWidget());
+ m_filter.arg(m_displayName), this->parentWidget());
if (!list.empty())
{
m_mods->stopWatching();
diff --git a/application/pages/ModFolderPage.h b/application/pages/ModFolderPage.h
index 6bfbf1d0..cbd98cb7 100644
--- a/application/pages/ModFolderPage.h
+++ b/application/pages/ModFolderPage.h
@@ -36,6 +36,12 @@ public:
QString iconName, QString displayName, QString helpPage = "",
QWidget *parent = 0);
virtual ~ModFolderPage();
+
+ void setFilter(const QString & filter)
+ {
+ m_filter = filter;
+ }
+
virtual QString displayName() const override
{
return m_displayName;
@@ -70,6 +76,7 @@ private:
QString m_id;
QString m_displayName;
QString m_helpName;
+ QString m_filter;
public
slots: