summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-07 23:09:50 +0200
committerPetr Mrázek <peterix@gmail.com>2013-10-08 01:38:26 +0200
commita58912eaf7e98c1bc9e960fbf77b6293e57c28a1 (patch)
tree7408fbdb67054ba5ffec8341658ea391d1f4b4c5
parent346087efbb1eadf462b8b448a0d4c0458d3a2c0c (diff)
downloadMultiMC-a58912eaf7e98c1bc9e960fbf77b6293e57c28a1.tar
MultiMC-a58912eaf7e98c1bc9e960fbf77b6293e57c28a1.tar.gz
MultiMC-a58912eaf7e98c1bc9e960fbf77b6293e57c28a1.tar.lz
MultiMC-a58912eaf7e98c1bc9e960fbf77b6293e57c28a1.tar.xz
MultiMC-a58912eaf7e98c1bc9e960fbf77b6293e57c28a1.zip
Basic version changing (OneSix only for now)
-rw-r--r--gui/mainwindow.cpp3
-rw-r--r--gui/mainwindow.ui4
-rw-r--r--logic/LegacyInstance.cpp2
-rw-r--r--logic/NostalgiaInstance.cpp4
-rw-r--r--logic/NostalgiaInstance.h1
-rw-r--r--logic/lists/MinecraftVersionList.cpp4
6 files changed, 15 insertions, 3 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 080ce4b2..70d26e02 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -602,6 +602,7 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
VersionSelectDialog vselect(m_selectedInstance->versionList().get(),
tr("Change Minecraft version"), this);
+ vselect.setFilter(1, "OneSix");
if (vselect.exec() && vselect.selectedVersion())
{
m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
@@ -646,6 +647,8 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
m_selectedInstance->menuActionEnabled("actionChangeInstLWJGLVersion"));
ui->actionEditInstMods->setEnabled(
m_selectedInstance->menuActionEnabled("actionEditInstMods"));
+ ui->actionChangeInstMCVersion->setEnabled(
+ m_selectedInstance->menuActionEnabled("actionChangeInstMCVersion"));
statusBar()->clearMessage();
statusBar()->showMessage(m_selectedInstance->getStatusbarDescription());
auto ico = MMC->icons()->getIcon(iconKey);
diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui
index 1cda7a34..4c288d5f 100644
--- a/gui/mainwindow.ui
+++ b/gui/mainwindow.ui
@@ -107,6 +107,7 @@
<addaction name="actionChangeInstGroup"/>
<addaction name="separator"/>
<addaction name="actionInstanceSettings"/>
+ <addaction name="actionChangeInstMCVersion"/>
<addaction name="actionChangeInstLWJGLVersion"/>
<addaction name="actionEditInstMods"/>
<addaction name="actionViewSelectedInstFolder"/>
@@ -371,9 +372,6 @@
</property>
</action>
<action name="actionChangeInstMCVersion">
- <property name="enabled">
- <bool>false</bool>
- </property>
<property name="text">
<string>Change Version</string>
</property>
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp
index 2ffcb075..205f6873 100644
--- a/logic/LegacyInstance.cpp
+++ b/logic/LegacyInstance.cpp
@@ -314,6 +314,8 @@ QString LegacyInstance::defaultCustomBaseJar() const
bool LegacyInstance::menuActionEnabled ( QString action_name ) const
{
+ if (action_name == "actionChangeInstMCVersion")
+ return false;
return true;
}
diff --git a/logic/NostalgiaInstance.cpp b/logic/NostalgiaInstance.cpp
index 039cd9ce..efd8f46b 100644
--- a/logic/NostalgiaInstance.cpp
+++ b/logic/NostalgiaInstance.cpp
@@ -11,6 +11,10 @@ QString NostalgiaInstance::getStatusbarDescription()
return "Nostalgia : " + intendedVersionId();
}
+bool NostalgiaInstance::menuActionEnabled(QString action_name) const
+{
+ return false;
+}
/*
ADD MORE
diff --git a/logic/NostalgiaInstance.h b/logic/NostalgiaInstance.h
index 1436e48d..64eb7a81 100644
--- a/logic/NostalgiaInstance.h
+++ b/logic/NostalgiaInstance.h
@@ -8,5 +8,6 @@ class NostalgiaInstance : public OneSixInstance
public:
explicit NostalgiaInstance(const QString &rootDir, SettingsObject * settings, QObject *parent = 0);
virtual QString getStatusbarDescription();
+ virtual bool menuActionEnabled(QString action_name) const;
};
diff --git a/logic/lists/MinecraftVersionList.cpp b/logic/lists/MinecraftVersionList.cpp
index 36611165..fbf609b5 100644
--- a/logic/lists/MinecraftVersionList.cpp
+++ b/logic/lists/MinecraftVersionList.cpp
@@ -122,9 +122,13 @@ MCVListLoadTask::MCVListLoadTask(MinecraftVersionList *vlist)
legacyWhitelist.insert("1.4.6");
legacyWhitelist.insert("1.4.5");
legacyWhitelist.insert("1.4.4");
+ legacyWhitelist.insert("1.4.3");
legacyWhitelist.insert("1.4.2");
+ legacyWhitelist.insert("1.4.1");
+ legacyWhitelist.insert("1.4");
legacyWhitelist.insert("1.3.2");
legacyWhitelist.insert("1.3.1");
+ legacyWhitelist.insert("1.3");
legacyWhitelist.insert("1.2.5");
legacyWhitelist.insert("1.2.4");
legacyWhitelist.insert("1.2.3");