summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-07-23 21:29:03 +0200
committerPetr Mrázek <peterix@gmail.com>2017-09-09 18:30:22 +0200
commitb29382c748353856053f07b4756fa98f854244e1 (patch)
treef87f95bf99dd0a7251df2a8f8ada2244d402c244 /application
parent4c01983f470e25dfd4c997201370057bba64832e (diff)
downloadMultiMC-b29382c748353856053f07b4756fa98f854244e1.tar
MultiMC-b29382c748353856053f07b4756fa98f854244e1.tar.gz
MultiMC-b29382c748353856053f07b4756fa98f854244e1.tar.lz
MultiMC-b29382c748353856053f07b4756fa98f854244e1.tar.xz
MultiMC-b29382c748353856053f07b4756fa98f854244e1.zip
NOISSUE Remove Legacy support
Diffstat (limited to 'application')
-rw-r--r--application/CMakeLists.txt6
-rw-r--r--application/InstancePageProvider.h18
-rw-r--r--application/MainWindow.cpp1
-rw-r--r--application/pages/LegacyJarModPage.cpp162
-rw-r--r--application/pages/LegacyJarModPage.h76
-rw-r--r--application/pages/LegacyJarModPage.ui162
-rw-r--r--application/pages/LegacyUpgradePage.cpp25
-rw-r--r--application/pages/LegacyUpgradePage.h60
-rw-r--r--application/pages/LegacyUpgradePage.ui51
9 files changed, 0 insertions, 561 deletions
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index 5d3a964d..70cb1e93 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -131,10 +131,6 @@ SET(MULTIMC_SOURCES
pages/ScreenshotsPage.h
pages/OtherLogsPage.cpp
pages/OtherLogsPage.h
- pages/LegacyJarModPage.cpp
- pages/LegacyJarModPage.h
- pages/LegacyUpgradePage.cpp
- pages/LegacyUpgradePage.h
pages/WorldListPage.cpp
pages/WorldListPage.h
@@ -241,8 +237,6 @@ SET(MULTIMC_UIS
pages/NotesPage.ui
pages/ScreenshotsPage.ui
pages/OtherLogsPage.ui
- pages/LegacyJarModPage.ui
- pages/LegacyUpgradePage.ui
pages/WorldListPage.ui
# Global settings pages
diff --git a/application/InstancePageProvider.h b/application/InstancePageProvider.h
index 1d6cc5d7..2f1dcced 100644
--- a/application/InstancePageProvider.h
+++ b/application/InstancePageProvider.h
@@ -1,6 +1,5 @@
#pragma once
#include "minecraft/onesix/OneSixInstance.h"
-#include "minecraft/legacy/LegacyInstance.h"
#include <FileSystem.h>
#include "pages/BasePage.h"
#include "pages/LogPage.h"
@@ -13,7 +12,6 @@
#include "pages/InstanceSettingsPage.h"
#include "pages/OtherLogsPage.h"
#include "pages/BasePageProvider.h"
-#include "pages/LegacyJarModPage.h"
#include "pages/WorldListPage.h"
@@ -46,22 +44,6 @@ public:
values.append(new ScreenshotsPage(FS::PathCombine(onesix->minecraftRoot(), "screenshots")));
values.append(new InstanceSettingsPage(onesix.get()));
}
- std::shared_ptr<LegacyInstance> legacy = std::dynamic_pointer_cast<LegacyInstance>(inst);
- if(legacy)
- {
- // FIXME: actually implement the legacy instance upgrade, then enable this.
- //values.append(new LegacyUpgradePage(this));
- values.append(new LegacyJarModPage(legacy.get()));
- auto modsPage = new ModFolderPage(legacy.get(), legacy->loaderModList(), "mods", "loadermods", tr("Loader mods"), "Loader-mods");
- modsPage->setFilter("%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 WorldListPage(legacy.get(), legacy->worldList(), "worlds", "worlds", tr("Worlds"), "Worlds"));
- values.append(new ScreenshotsPage(FS::PathCombine(legacy->minecraftRoot(), "screenshots")));
- values.append(new InstanceSettingsPage(legacy.get()));
- }
auto logMatcher = inst->getLogFileMatcher();
if(logMatcher)
{
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 9eba9c44..86f0398d 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -54,7 +54,6 @@
#include <java/JavaUtils.h>
#include <java/JavaInstallList.h>
#include <launch/LaunchTask.h>
-#include <minecraft/legacy/LwjglVersionList.h>
#include <minecraft/auth/MojangAccountList.h>
#include <SkinUtils.h>
#include <net/URLConstants.h>
diff --git a/application/pages/LegacyJarModPage.cpp b/application/pages/LegacyJarModPage.cpp
deleted file mode 100644
index c13bce8c..00000000
--- a/application/pages/LegacyJarModPage.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright 2013-2017 MultiMC Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "LegacyJarModPage.h"
-#include "ui_LegacyJarModPage.h"
-
-#include <QKeyEvent>
-#include <QKeyEvent>
-
-#include "dialogs/VersionSelectDialog.h"
-#include "dialogs/ProgressDialog.h"
-#include "dialogs/ModEditDialogCommon.h"
-#include "minecraft/legacy/LegacyModList.h"
-#include "minecraft/legacy/LegacyInstance.h"
-#include "Env.h"
-#include <DesktopServices.h>
-#include "MultiMC.h"
-#include <GuiUtil.h>
-
-LegacyJarModPage::LegacyJarModPage(LegacyInstance *inst, QWidget *parent)
- : QWidget(parent), ui(new Ui::LegacyJarModPage), m_inst(inst)
-{
- ui->setupUi(this);
- ui->tabWidget->tabBar()->hide();
-
- m_jarmods = m_inst->jarModList();
- ui->jarModsTreeView->setModel(m_jarmods.get());
- ui->jarModsTreeView->setDragDropMode(QAbstractItemView::DragDrop);
- ui->jarModsTreeView->setSelectionMode(QAbstractItemView::SingleSelection);
- ui->jarModsTreeView->installEventFilter(this);
- m_jarmods->startWatching();
- auto smodel = ui->jarModsTreeView->selectionModel();
- connect(smodel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- SLOT(jarCurrent(QModelIndex, QModelIndex)));
-}
-
-LegacyJarModPage::~LegacyJarModPage()
-{
- m_jarmods->stopWatching();
- delete ui;
-}
-
-bool LegacyJarModPage::shouldDisplay() const
-{
- return !m_inst->isRunning();
-}
-
-bool LegacyJarModPage::eventFilter(QObject *obj, QEvent *ev)
-{
- if (ev->type() != QEvent::KeyPress || obj != ui->jarModsTreeView)
- {
- return QWidget::eventFilter(obj, ev);
- }
-
- QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
- switch (keyEvent->key())
- {
- case Qt::Key_Up:
- {
- if (keyEvent->modifiers() & Qt::ControlModifier)
- {
- on_moveJarUpBtn_clicked();
- return true;
- }
- break;
- }
- case Qt::Key_Down:
- {
- if (keyEvent->modifiers() & Qt::ControlModifier)
- {
- on_moveJarDownBtn_clicked();
- return true;
- }
- break;
- }
- case Qt::Key_Delete:
- on_rmJarBtn_clicked();
- return true;
- case Qt::Key_Plus:
- on_addJarBtn_clicked();
- return true;
- default:
- break;
- }
- return QWidget::eventFilter(obj, ev);
-}
-
-void LegacyJarModPage::on_addJarBtn_clicked()
-{
- auto list = GuiUtil::BrowseForFiles("jarmod", tr("Select jar mods"), tr("Minecraft.jar mods (*.zip *.jar)"), MMC->settings()->get("CentralModsDir").toString(), this->parentWidget());
- if(!list.empty())
- {
- m_jarmods->stopWatching();
- for (auto filename : list)
- {
- m_jarmods->installMod(filename);
- }
- m_jarmods->startWatching();
- }
-}
-
-void LegacyJarModPage::on_moveJarDownBtn_clicked()
-{
- int first, last;
- auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
-
- if (!lastfirst(list, first, last))
- return;
-
- m_jarmods->moveModsDown(first, last);
-}
-
-void LegacyJarModPage::on_moveJarUpBtn_clicked()
-{
- int first, last;
- auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
-
- if (!lastfirst(list, first, last))
- return;
- m_jarmods->moveModsUp(first, last);
-}
-
-void LegacyJarModPage::on_rmJarBtn_clicked()
-{
- int first, last;
- auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
-
- if (!lastfirst(list, first, last))
- return;
- m_jarmods->stopWatching();
- m_jarmods->deleteMods(first, last);
- m_jarmods->startWatching();
-}
-
-void LegacyJarModPage::on_viewJarBtn_clicked()
-{
- DesktopServices::openDirectory(m_inst->jarModsDir(), true);
-}
-
-void LegacyJarModPage::jarCurrent(QModelIndex current, QModelIndex previous)
-{
- if (!current.isValid())
- {
- ui->jarMIFrame->clear();
- return;
- }
- int row = current.row();
- Mod &m = m_jarmods->operator[](row);
- ui->jarMIFrame->updateWithMod(m);
-}
diff --git a/application/pages/LegacyJarModPage.h b/application/pages/LegacyJarModPage.h
deleted file mode 100644
index 2a5ac75f..00000000
--- a/application/pages/LegacyJarModPage.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright 2013-2017 MultiMC Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <QWidget>
-
-#include "net/NetJob.h"
-#include "BasePage.h"
-#include <MultiMC.h>
-
-class LegacyModList;
-class LegacyInstance;
-namespace Ui
-{
-class LegacyJarModPage;
-}
-
-class LegacyJarModPage : public QWidget, public BasePage
-{
- Q_OBJECT
-
-public:
- explicit LegacyJarModPage(LegacyInstance *inst, QWidget *parent = 0);
- virtual ~LegacyJarModPage();
-
- virtual QString displayName() const override
- {
- return tr("Jar Mods");
- }
- virtual QIcon icon() const override
- {
- return MMC->getThemedIcon("jarmods");
- }
- virtual QString id() const override
- {
- return "jarmods";
- }
- virtual QString helpPage() const override
- {
- return "Legacy-jar-mods";
- }
- virtual bool shouldDisplay() const override;
-
-private
-slots:
-
- void on_addJarBtn_clicked();
- void on_rmJarBtn_clicked();
- void on_moveJarUpBtn_clicked();
- void on_moveJarDownBtn_clicked();
- void on_viewJarBtn_clicked();
-
- void jarCurrent(QModelIndex current, QModelIndex previous);
-
-protected:
- virtual bool eventFilter(QObject *obj, QEvent *ev) override;
-
-private:
- Ui::LegacyJarModPage *ui;
- std::shared_ptr<LegacyModList> m_jarmods;
- LegacyInstance *m_inst;
- NetJobPtr forgeJob;
-};
diff --git a/application/pages/LegacyJarModPage.ui b/application/pages/LegacyJarModPage.ui
deleted file mode 100644
index 137a4ae5..00000000
--- a/application/pages/LegacyJarModPage.ui
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>LegacyJarModPage</class>
- <widget class="QWidget" name="LegacyJarModPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>659</width>
- <height>593</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="tab">
- <attribute name="title">
- <string notr="true">Tab 1</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="ModListView" name="jarModsTreeView">
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOn</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="jarModsButtonBox">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Selection</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="rmJarBtn">
- <property name="text">
- <string>&amp;Remove</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="moveJarUpBtn">
- <property name="text">
- <string>Move &amp;Up</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="moveJarDownBtn">
- <property name="text">
- <string>Move &amp;Down</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="LineSeparator" name="separator" native="true"/>
- </item>
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Install</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="addJarBtn">
- <property name="text">
- <string>&amp;Add jar mod</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="viewJarBtn">
- <property name="text">
- <string>&amp;View Folder</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="MCModInfoFrame" name="jarMIFrame">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>ModListView</class>
- <extends>QTreeView</extends>
- <header>widgets/ModListView.h</header>
- </customwidget>
- <customwidget>
- <class>MCModInfoFrame</class>
- <extends>QFrame</extends>
- <header>widgets/MCModInfoFrame.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
- <class>LineSeparator</class>
- <extends>QWidget</extends>
- <header>widgets/LineSeparator.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/application/pages/LegacyUpgradePage.cpp b/application/pages/LegacyUpgradePage.cpp
deleted file mode 100644
index 14cb916d..00000000
--- a/application/pages/LegacyUpgradePage.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "LegacyUpgradePage.h"
-#include "ui_LegacyUpgradePage.h"
-
-#include "minecraft/legacy/LegacyInstance.h"
-
-LegacyUpgradePage::LegacyUpgradePage(LegacyInstance *inst, QWidget *parent)
- : QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst)
-{
- ui->setupUi(this);
-}
-
-LegacyUpgradePage::~LegacyUpgradePage()
-{
- delete ui;
-}
-
-void LegacyUpgradePage::on_upgradeButton_clicked()
-{
- // now what?
-}
-
-bool LegacyUpgradePage::shouldDisplay() const
-{
- return !m_inst->isRunning();
-}
diff --git a/application/pages/LegacyUpgradePage.h b/application/pages/LegacyUpgradePage.h
deleted file mode 100644
index 4731bb82..00000000
--- a/application/pages/LegacyUpgradePage.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright 2013-2017 MultiMC Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <QWidget>
-
-#include "minecraft/legacy/LegacyInstance.h"
-#include "pages/BasePage.h"
-#include <MultiMC.h>
-
-namespace Ui
-{
-class LegacyUpgradePage;
-}
-
-class LegacyUpgradePage : public QWidget, public BasePage
-{
- Q_OBJECT
-
-public:
- explicit LegacyUpgradePage(LegacyInstance *inst, QWidget *parent = 0);
- virtual ~LegacyUpgradePage();
- virtual QString displayName() const override
- {
- return tr("Upgrade");
- }
- virtual QIcon icon() const override
- {
- return MMC->getThemedIcon("checkupdate");
- }
- virtual QString id() const override
- {
- return "upgrade";
- }
- virtual QString helpPage() const override
- {
- return "Legacy-upgrade";
- }
- virtual bool shouldDisplay() const override;
-private
-slots:
- void on_upgradeButton_clicked();
-
-private:
- Ui::LegacyUpgradePage *ui;
- LegacyInstance *m_inst;
-};
diff --git a/application/pages/LegacyUpgradePage.ui b/application/pages/LegacyUpgradePage.ui
deleted file mode 100644
index 94a5c371..00000000
--- a/application/pages/LegacyUpgradePage.ui
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>LegacyUpgradePage</class>
- <widget class="QWidget" name="LegacyUpgradePage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>546</width>
- <height>405</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QTextBrowser" name="textBrowser">
- <property name="html">
- <string>
-&lt;h1&gt;New format is available&lt;/h1&gt;
-&lt;p&gt;MultiMC now supports old Minecraft versions in the new (OneSix) instance format. The old format won't be getting any new features and only the most critical bugfixes. As a consequence, you should upgrade this instance.&lt;/p&gt;
-&lt;p&gt;The upgrade will create a new instance with the same contents as the current one, in the new format. The original instance will remain untouched, in case anything goes wrong in the process.&lt;/p&gt;
-&lt;p&gt;Please report any issues on our &lt;a href=&quot;https://github.com/MultiMC/MultiMC5/issues&quot;&gt;&lt;img src=&quot;:/icons/multimc/22x22/bug.png&quot; /&gt; github issues page&lt;/a&gt;.&lt;/p&gt;</string>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCommandLinkButton" name="upgradeButton">
- <property name="text">
- <string>Start the upgrade! (Not Yet Implemented, Coming Soon™)</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>