summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-06-20 01:24:32 +0200
committerPetr Mrázek <peterix@gmail.com>2014-06-20 01:24:32 +0200
commit1194ec9a8e78df9e8e19d54d63a2379408dc7a66 (patch)
treef1d8fc99127f31a495682c34e43c22c90d80d444
parentd911c9908c11c42144084c862c64b740cfb0c02f (diff)
downloadMultiMC-1194ec9a8e78df9e8e19d54d63a2379408dc7a66.tar
MultiMC-1194ec9a8e78df9e8e19d54d63a2379408dc7a66.tar.gz
MultiMC-1194ec9a8e78df9e8e19d54d63a2379408dc7a66.tar.lz
MultiMC-1194ec9a8e78df9e8e19d54d63a2379408dc7a66.tar.xz
MultiMC-1194ec9a8e78df9e8e19d54d63a2379408dc7a66.zip
No more disabling of actions in the instance toolbar. It makes no sense.
-rw-r--r--gui/MainWindow.cpp2
-rw-r--r--logic/BaseInstance.h3
-rw-r--r--logic/LegacyFTBInstance.cpp5
-rw-r--r--logic/LegacyFTBInstance.h1
-rw-r--r--logic/LegacyInstance.cpp13
-rw-r--r--logic/LegacyInstance.h1
-rw-r--r--logic/OneSixFTBInstance.cpp4
-rw-r--r--logic/OneSixFTBInstance.h1
-rw-r--r--logic/OneSixInstance.cpp13
-rw-r--r--logic/OneSixInstance.h1
10 files changed, 0 insertions, 44 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 35ac541d..b8f42dc4 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -1369,8 +1369,6 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
{
ui->instanceToolBar->setEnabled(m_selectedInstance->canLaunch());
renameButton->setText(m_selectedInstance->name());
- ui->actionEditInstance->setEnabled(
- m_selectedInstance->menuActionEnabled("actionEditInstance"));
m_statusLeft->setText(m_selectedInstance->getStatusbarDescription());
updateInstanceToolIcon(m_selectedInstance->iconKey());
diff --git a/logic/BaseInstance.h b/logic/BaseInstance.h
index 2eba1fff..9598549b 100644
--- a/logic/BaseInstance.h
+++ b/logic/BaseInstance.h
@@ -183,9 +183,6 @@ public:
/// 'prepareForLaunch'
virtual void cleanupAfterRun() = 0;
- /// is a particular action enabled with this instance selected?
- virtual bool menuActionEnabled(QString action_name) const = 0;
-
virtual QString getStatusbarDescription() = 0;
/// FIXME: this really should be elsewhere...
diff --git a/logic/LegacyFTBInstance.cpp b/logic/LegacyFTBInstance.cpp
index 3c3356c9..73a1f73d 100644
--- a/logic/LegacyFTBInstance.cpp
+++ b/logic/LegacyFTBInstance.cpp
@@ -14,11 +14,6 @@ QString LegacyFTBInstance::getStatusbarDescription()
return "Legacy FTB: " + intendedVersionId();
}
-bool LegacyFTBInstance::menuActionEnabled(QString action_name) const
-{
- return false;
-}
-
QString LegacyFTBInstance::id() const
{
return "FTB/" + BaseInstance::id();
diff --git a/logic/LegacyFTBInstance.h b/logic/LegacyFTBInstance.h
index 70f60535..a2fe1ead 100644
--- a/logic/LegacyFTBInstance.h
+++ b/logic/LegacyFTBInstance.h
@@ -9,6 +9,5 @@ public:
explicit LegacyFTBInstance(const QString &rootDir, SettingsObject *settings,
QObject *parent = 0);
virtual QString getStatusbarDescription();
- virtual bool menuActionEnabled(QString action_name) const;
virtual QString id() const;
};
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp
index b646bd7b..4b856b0d 100644
--- a/logic/LegacyInstance.cpp
+++ b/logic/LegacyInstance.cpp
@@ -282,19 +282,6 @@ QString LegacyInstance::defaultCustomBaseJar() const
return PathCombine(binDir(), "mcbackup.jar");
}
-bool LegacyInstance::menuActionEnabled(QString action_name) const
-{
- if (flags().contains(VersionBrokenFlag))
- {
- return false;
- }
- if (action_name == "actionChangeInstMCVersion")
- {
- return false;
- }
- return true;
-}
-
QString LegacyInstance::getStatusbarDescription()
{
if (flags().contains(VersionBrokenFlag))
diff --git a/logic/LegacyInstance.h b/logic/LegacyInstance.h
index d367b990..76a8c24d 100644
--- a/logic/LegacyInstance.h
+++ b/logic/LegacyInstance.h
@@ -95,7 +95,6 @@ public:
virtual QString defaultBaseJar() const override;
virtual QString defaultCustomBaseJar() const override;
- bool menuActionEnabled(QString action_name) const;
virtual QString getStatusbarDescription() override;
protected
diff --git a/logic/OneSixFTBInstance.cpp b/logic/OneSixFTBInstance.cpp
index 05918231..ef951987 100644
--- a/logic/OneSixFTBInstance.cpp
+++ b/logic/OneSixFTBInstance.cpp
@@ -125,10 +125,6 @@ QString OneSixFTBInstance::getStatusbarDescription()
}
return "OneSix FTB: " + intendedVersionId();
}
-bool OneSixFTBInstance::menuActionEnabled(QString action_name) const
-{
- return false;
-}
std::shared_ptr<Task> OneSixFTBInstance::doUpdate()
{
diff --git a/logic/OneSixFTBInstance.h b/logic/OneSixFTBInstance.h
index 440dc9f1..ecfa2231 100644
--- a/logic/OneSixFTBInstance.h
+++ b/logic/OneSixFTBInstance.h
@@ -16,7 +16,6 @@ public:
void copy(const QDir &newDir) override;
virtual QString getStatusbarDescription();
- virtual bool menuActionEnabled(QString action_name) const;
virtual std::shared_ptr<Task> doUpdate() override;
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp
index 30e62d73..98244831 100644
--- a/logic/OneSixInstance.cpp
+++ b/logic/OneSixInstance.cpp
@@ -453,19 +453,6 @@ QString OneSixInstance::defaultCustomBaseJar() const
return PathCombine(instanceRoot(), "custom.jar");
}
-bool OneSixInstance::menuActionEnabled(QString action_name) const
-{
- if (flags().contains(VersionBrokenFlag))
- {
- return false;
- }
- if (action_name == "actionChangeInstLWJGLVersion")
- {
- return false;
- }
- return true;
-}
-
QString OneSixInstance::getStatusbarDescription()
{
QStringList traits;
diff --git a/logic/OneSixInstance.h b/logic/OneSixInstance.h
index 405cfe97..75caef1f 100644
--- a/logic/OneSixInstance.h
+++ b/logic/OneSixInstance.h
@@ -87,7 +87,6 @@ public:
virtual QString defaultBaseJar() const override;
virtual QString defaultCustomBaseJar() const override;
- virtual bool menuActionEnabled(QString action_name) const override;
virtual QString getStatusbarDescription() override;
virtual QDir jarmodsPath() const;