No more disabling of actions in the instance toolbar. It makes no sense.

This commit is contained in:
Petr Mrázek 2014-06-20 01:24:32 +02:00
parent d911c9908c
commit 1194ec9a8e
10 changed files with 0 additions and 44 deletions

View File

@ -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());

View File

@ -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...

View File

@ -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();

View File

@ -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;
};

View File

@ -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))

View File

@ -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

View File

@ -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()
{

View File

@ -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;

View File

@ -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;

View File

@ -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;