summaryrefslogtreecommitdiffstats
path: root/gui/pages
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-31 16:59:03 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-02 11:30:24 +0200
commit6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f (patch)
tree28aaf76918d1ff0ffe2a437573bb1ab7a012c4ec /gui/pages
parente508728246043fcaf8bee565e73b15e15eb2e531 (diff)
downloadMultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.gz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.lz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.xz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.zip
NOISSUE Split MultiMC app object into MultiMC and Env
Diffstat (limited to 'gui/pages')
-rw-r--r--gui/pages/LegacyJarModPage.cpp3
-rw-r--r--gui/pages/global/AccountListPage.cpp3
-rw-r--r--gui/pages/global/MinecraftPage.cpp4
-rw-r--r--gui/pages/global/MinecraftPage.ui19
4 files changed, 5 insertions, 24 deletions
diff --git a/gui/pages/LegacyJarModPage.cpp b/gui/pages/LegacyJarModPage.cpp
index 8eddf625..219e92ef 100644
--- a/gui/pages/LegacyJarModPage.cpp
+++ b/gui/pages/LegacyJarModPage.cpp
@@ -29,6 +29,7 @@
#include "logic/LegacyInstance.h"
#include "logic/forge/ForgeVersion.h"
#include "logic/forge/ForgeVersionList.h"
+#include "logic/Env.h"
#include "MultiMC.h"
LegacyJarModPage::LegacyJarModPage(LegacyInstance *inst, QWidget *parent)
@@ -109,7 +110,7 @@ void LegacyJarModPage::on_addForgeBtn_clicked()
std::dynamic_pointer_cast<ForgeVersion>(vselect.selectedVersion());
if (!forge)
return;
- auto entry = MMC->metacache()->resolveEntry("minecraftforge", forge->filename());
+ auto entry = Env::getInstance().metacache()->resolveEntry("minecraftforge", forge->filename());
if (entry->stale)
{
NetJob *fjob = new NetJob("Forge download");
diff --git a/gui/pages/global/AccountListPage.cpp b/gui/pages/global/AccountListPage.cpp
index dec7c6e0..2de77115 100644
--- a/gui/pages/global/AccountListPage.cpp
+++ b/gui/pages/global/AccountListPage.cpp
@@ -22,6 +22,7 @@
#include "logic/net/NetJob.h"
#include "logic/net/URLConstants.h"
+#include "logic/Env.h"
#include "gui/dialogs/EditAccountDialog.h"
#include "gui/dialogs/ProgressDialog.h"
@@ -129,7 +130,7 @@ void AccountListPage::addAccount(const QString &errMsg)
for (AccountProfile profile : account->profiles())
{
- auto meta = MMC->metacache()->resolveEntry("skins", profile.name + ".png");
+ auto meta = Env::getInstance().metacache()->resolveEntry("skins", profile.name + ".png");
auto action = CacheDownload::make(
QUrl("http://" + URLConstants::SKINS_BASE + profile.name + ".png"), meta);
job->addNetAction(action);
diff --git a/gui/pages/global/MinecraftPage.cpp b/gui/pages/global/MinecraftPage.cpp
index c2a015ad..5566542c 100644
--- a/gui/pages/global/MinecraftPage.cpp
+++ b/gui/pages/global/MinecraftPage.cpp
@@ -74,8 +74,6 @@ void MinecraftPage::on_maximizedCheckBox_clicked(bool checked)
void MinecraftPage::applySettings()
{
auto s = MMC->settings();
- // Minecraft version updates
- s->set("AutoUpdateMinecraftVersions", ui->autoupdateMinecraft->isChecked());
// Window Size
s->set("LaunchMaximized", ui->maximizedCheckBox->isChecked());
@@ -86,8 +84,6 @@ void MinecraftPage::applySettings()
void MinecraftPage::loadSettings()
{
auto s = MMC->settings();
- // Minecraft version updates
- ui->autoupdateMinecraft->setChecked(s->get("AutoUpdateMinecraftVersions").toBool());
// Window Size
ui->maximizedCheckBox->setChecked(s->get("LaunchMaximized").toBool());
diff --git a/gui/pages/global/MinecraftPage.ui b/gui/pages/global/MinecraftPage.ui
index 9e7df224..825f6a56 100644
--- a/gui/pages/global/MinecraftPage.ui
+++ b/gui/pages/global/MinecraftPage.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>545</width>
- <height>270</height>
+ <height>195</height>
</rect>
</property>
<property name="sizePolicy">
@@ -50,22 +50,6 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="groupBox_5">
- <property name="title">
- <string>Minecraft Version Updates</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_14">
- <item>
- <widget class="QCheckBox" name="autoupdateMinecraft">
- <property name="text">
- <string>Automatically update to latest version revision</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<widget class="QGroupBox" name="windowSizeGroupBox">
<property name="title">
<string>Window Size</string>
@@ -155,7 +139,6 @@
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
- <tabstop>autoupdateMinecraft</tabstop>
<tabstop>maximizedCheckBox</tabstop>
<tabstop>windowWidthSpinBox</tabstop>
<tabstop>windowHeightSpinBox</tabstop>