NOISSUE fix legacy edit instance
This commit is contained in:
parent
fe540e5dda
commit
9df2f1fa5c
@ -177,6 +177,10 @@ SET(MULTIMC_SOURCES
|
||||
pages/ScreenshotsPage.h
|
||||
pages/OtherLogsPage.cpp
|
||||
pages/OtherLogsPage.h
|
||||
pages/LegacyJarModPage.cpp
|
||||
pages/LegacyJarModPage.h
|
||||
pages/LegacyUpgradePage.cpp
|
||||
pages/LegacyUpgradePage.h
|
||||
|
||||
# GUI - global settings pages
|
||||
pages/global/AccountListPage.cpp
|
||||
@ -266,6 +270,8 @@ SET(MULTIMC_UIS
|
||||
pages/NotesPage.ui
|
||||
pages/ScreenshotsPage.ui
|
||||
pages/OtherLogsPage.ui
|
||||
pages/LegacyJarModPage.ui
|
||||
pages/LegacyUpgradePage.ui
|
||||
|
||||
# Global settings pages
|
||||
pages/global/AccountListPage.ui
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "minecraft/OneSixInstance.h"
|
||||
#include "minecraft/LegacyInstance.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include "pages/VersionPage.h"
|
||||
#include "pages/ModFolderPage.h"
|
||||
@ -10,8 +11,10 @@
|
||||
#include "pages/InstanceSettingsPage.h"
|
||||
#include "pages/OtherLogsPage.h"
|
||||
#include "pages/BasePageProvider.h"
|
||||
#include "pages/LegacyJarModPage.h"
|
||||
#include <pathutils.h>
|
||||
|
||||
|
||||
class InstancePageProvider : public QObject, public BasePageProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -40,6 +43,24 @@ public:
|
||||
values.append(new InstanceSettingsPage(onesix.get()));
|
||||
values.append(new OtherLogsPage(onesix->minecraftRoot()));
|
||||
}
|
||||
std::shared_ptr<LegacyInstance> legacy = std::dynamic_pointer_cast<LegacyInstance>(inst);
|
||||
if(legacy)
|
||||
{
|
||||
QList<BasePage *> values;
|
||||
// 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"));
|
||||
values.append(new TexturePackPage(legacy.get()));
|
||||
values.append(new NotesPage(legacy.get()));
|
||||
values.append(new ScreenshotsPage(PathCombine(legacy->minecraftRoot(), "screenshots")));
|
||||
values.append(new InstanceSettingsPage(legacy.get()));
|
||||
values.append(new OtherLogsPage(legacy->minecraftRoot()));
|
||||
return values;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
|
@ -22,14 +22,12 @@
|
||||
|
||||
#include <pathutils.h>
|
||||
|
||||
#include "gui/dialogs/VersionSelectDialog.h"
|
||||
#include "gui/dialogs/ProgressDialog.h"
|
||||
#include "gui/dialogs/ModEditDialogCommon.h"
|
||||
#include "logic/minecraft/ModList.h"
|
||||
#include "logic/minecraft/LegacyInstance.h"
|
||||
#include "logic/forge/ForgeVersion.h"
|
||||
#include "logic/forge/ForgeVersionList.h"
|
||||
#include "logic/Env.h"
|
||||
#include "dialogs/VersionSelectDialog.h"
|
||||
#include "dialogs/ProgressDialog.h"
|
||||
#include "dialogs/ModEditDialogCommon.h"
|
||||
#include "minecraft/ModList.h"
|
||||
#include "minecraft/LegacyInstance.h"
|
||||
#include "Env.h"
|
||||
#include "MultiMC.h"
|
||||
|
||||
LegacyJarModPage::LegacyJarModPage(LegacyInstance *inst, QWidget *parent)
|
||||
@ -102,6 +100,8 @@ bool LegacyJarModPage::eventFilter(QObject *obj, QEvent *ev)
|
||||
|
||||
void LegacyJarModPage::on_addForgeBtn_clicked()
|
||||
{
|
||||
//FIXME: dead. clean up.
|
||||
/*
|
||||
VersionSelectDialog vselect(MMC->forgelist().get(), tr("Select Forge version"), this);
|
||||
vselect.setExactFilter(1, m_inst->intendedVersionId());
|
||||
if (vselect.exec() && vselect.selectedVersion())
|
||||
@ -135,7 +135,7 @@ void LegacyJarModPage::on_addForgeBtn_clicked()
|
||||
m_jarmods->installMod(QFileInfo(entry->getFullPath()));
|
||||
m_jarmods->startWatching();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
void LegacyJarModPage::on_addJarBtn_clicked()
|
||||
{
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "logic/net/NetJob.h"
|
||||
#include "net/NetJob.h"
|
||||
#include "BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
@ -152,18 +152,18 @@
|
||||
<customwidget>
|
||||
<class>ModListView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>gui/widgets/ModListView.h</header>
|
||||
<header>widgets/ModListView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MCModInfoFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>gui/widgets/MCModInfoFrame.h</header>
|
||||
<header>widgets/MCModInfoFrame.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LineSeparator</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/widgets/LineSeparator.h</header>
|
||||
<header>widgets/LineSeparator.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
@ -1,7 +1,7 @@
|
||||
#include "LegacyUpgradePage.h"
|
||||
#include "ui_LegacyUpgradePage.h"
|
||||
|
||||
#include "logic/minecraft/LegacyInstance.h"
|
||||
#include "minecraft/LegacyInstance.h"
|
||||
|
||||
LegacyUpgradePage::LegacyUpgradePage(LegacyInstance *inst, QWidget *parent)
|
||||
: QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst)
|
@ -17,9 +17,9 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "logic/minecraft/OneSixInstance.h"
|
||||
#include "logic/net/NetJob.h"
|
||||
#include "gui/pages/BasePage.h"
|
||||
#include "minecraft/OneSixInstance.h"
|
||||
#include "net/NetJob.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
|
||||
namespace Ui
|
@ -26,15 +26,6 @@
|
||||
#include "icons/IconList.h"
|
||||
#include "minecraft/MinecraftProcess.h"
|
||||
#include "minecraft/ModList.h"
|
||||
/*
|
||||
#include "gui/pages/LegacyUpgradePage.h"
|
||||
#include "gui/pages/ModFolderPage.h"
|
||||
#include "gui/pages/LegacyJarModPage.h"
|
||||
#include <gui/pages/TexturePackPage.h>
|
||||
#include <gui/pages/InstanceSettingsPage.h>
|
||||
#include <gui/pages/NotesPage.h>
|
||||
#include <gui/pages/ScreenshotsPage.h>
|
||||
*/
|
||||
|
||||
LegacyInstance::LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir)
|
||||
: MinecraftInstance(globalSettings, settings, rootDir)
|
||||
@ -56,30 +47,6 @@ LegacyInstance::LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectP
|
||||
settings->registerSetting("CustomBaseJar", "");
|
||||
}
|
||||
|
||||
/*
|
||||
QList<BasePage *> LegacyInstance::getPages()
|
||||
{
|
||||
QList<BasePage *> values;
|
||||
// FIXME: actually implement the legacy instance upgrade, then enable this.
|
||||
//values.append(new LegacyUpgradePage(this));
|
||||
values.append(new LegacyJarModPage(this));
|
||||
values.append(new ModFolderPage(this, loaderModList(), "mods", "loadermods", tr("Loader mods"),
|
||||
"Loader-mods"));
|
||||
values.append(new ModFolderPage(this, coreModList(), "coremods", "coremods", tr("Core mods"),
|
||||
"Loader-mods"));
|
||||
values.append(new TexturePackPage(this));
|
||||
values.append(new NotesPage(this));
|
||||
values.append(new ScreenshotsPage(PathCombine(minecraftRoot(), "screenshots")));
|
||||
values.append(new InstanceSettingsPage(this));
|
||||
return values;
|
||||
}
|
||||
|
||||
QString LegacyInstance::dialogTitle()
|
||||
{
|
||||
return tr("Edit Instance (%1)").arg(name());
|
||||
}
|
||||
*/
|
||||
|
||||
QString LegacyInstance::baseJar() const
|
||||
{
|
||||
bool customJar = m_settings->get("UseCustomBaseJar").toBool();
|
||||
|
Loading…
Reference in New Issue
Block a user