No more disabling of actions in the instance toolbar. It makes no sense.
This commit is contained in:
parent
d911c9908c
commit
1194ec9a8e
@ -1369,8 +1369,6 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &
|
|||||||
{
|
{
|
||||||
ui->instanceToolBar->setEnabled(m_selectedInstance->canLaunch());
|
ui->instanceToolBar->setEnabled(m_selectedInstance->canLaunch());
|
||||||
renameButton->setText(m_selectedInstance->name());
|
renameButton->setText(m_selectedInstance->name());
|
||||||
ui->actionEditInstance->setEnabled(
|
|
||||||
m_selectedInstance->menuActionEnabled("actionEditInstance"));
|
|
||||||
m_statusLeft->setText(m_selectedInstance->getStatusbarDescription());
|
m_statusLeft->setText(m_selectedInstance->getStatusbarDescription());
|
||||||
updateInstanceToolIcon(m_selectedInstance->iconKey());
|
updateInstanceToolIcon(m_selectedInstance->iconKey());
|
||||||
|
|
||||||
|
@ -183,9 +183,6 @@ public:
|
|||||||
/// 'prepareForLaunch'
|
/// 'prepareForLaunch'
|
||||||
virtual void cleanupAfterRun() = 0;
|
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;
|
virtual QString getStatusbarDescription() = 0;
|
||||||
|
|
||||||
/// FIXME: this really should be elsewhere...
|
/// FIXME: this really should be elsewhere...
|
||||||
|
@ -14,11 +14,6 @@ QString LegacyFTBInstance::getStatusbarDescription()
|
|||||||
return "Legacy FTB: " + intendedVersionId();
|
return "Legacy FTB: " + intendedVersionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LegacyFTBInstance::menuActionEnabled(QString action_name) const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString LegacyFTBInstance::id() const
|
QString LegacyFTBInstance::id() const
|
||||||
{
|
{
|
||||||
return "FTB/" + BaseInstance::id();
|
return "FTB/" + BaseInstance::id();
|
||||||
|
@ -9,6 +9,5 @@ public:
|
|||||||
explicit LegacyFTBInstance(const QString &rootDir, SettingsObject *settings,
|
explicit LegacyFTBInstance(const QString &rootDir, SettingsObject *settings,
|
||||||
QObject *parent = 0);
|
QObject *parent = 0);
|
||||||
virtual QString getStatusbarDescription();
|
virtual QString getStatusbarDescription();
|
||||||
virtual bool menuActionEnabled(QString action_name) const;
|
|
||||||
virtual QString id() const;
|
virtual QString id() const;
|
||||||
};
|
};
|
||||||
|
@ -282,19 +282,6 @@ QString LegacyInstance::defaultCustomBaseJar() const
|
|||||||
return PathCombine(binDir(), "mcbackup.jar");
|
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()
|
QString LegacyInstance::getStatusbarDescription()
|
||||||
{
|
{
|
||||||
if (flags().contains(VersionBrokenFlag))
|
if (flags().contains(VersionBrokenFlag))
|
||||||
|
@ -95,7 +95,6 @@ public:
|
|||||||
virtual QString defaultBaseJar() const override;
|
virtual QString defaultBaseJar() const override;
|
||||||
virtual QString defaultCustomBaseJar() const override;
|
virtual QString defaultCustomBaseJar() const override;
|
||||||
|
|
||||||
bool menuActionEnabled(QString action_name) const;
|
|
||||||
virtual QString getStatusbarDescription() override;
|
virtual QString getStatusbarDescription() override;
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
@ -125,10 +125,6 @@ QString OneSixFTBInstance::getStatusbarDescription()
|
|||||||
}
|
}
|
||||||
return "OneSix FTB: " + intendedVersionId();
|
return "OneSix FTB: " + intendedVersionId();
|
||||||
}
|
}
|
||||||
bool OneSixFTBInstance::menuActionEnabled(QString action_name) const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Task> OneSixFTBInstance::doUpdate()
|
std::shared_ptr<Task> OneSixFTBInstance::doUpdate()
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,6 @@ public:
|
|||||||
void copy(const QDir &newDir) override;
|
void copy(const QDir &newDir) override;
|
||||||
|
|
||||||
virtual QString getStatusbarDescription();
|
virtual QString getStatusbarDescription();
|
||||||
virtual bool menuActionEnabled(QString action_name) const;
|
|
||||||
|
|
||||||
virtual std::shared_ptr<Task> doUpdate() override;
|
virtual std::shared_ptr<Task> doUpdate() override;
|
||||||
|
|
||||||
|
@ -453,19 +453,6 @@ QString OneSixInstance::defaultCustomBaseJar() const
|
|||||||
return PathCombine(instanceRoot(), "custom.jar");
|
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()
|
QString OneSixInstance::getStatusbarDescription()
|
||||||
{
|
{
|
||||||
QStringList traits;
|
QStringList traits;
|
||||||
|
@ -87,7 +87,6 @@ public:
|
|||||||
virtual QString defaultBaseJar() const override;
|
virtual QString defaultBaseJar() const override;
|
||||||
virtual QString defaultCustomBaseJar() const override;
|
virtual QString defaultCustomBaseJar() const override;
|
||||||
|
|
||||||
virtual bool menuActionEnabled(QString action_name) const override;
|
|
||||||
virtual QString getStatusbarDescription() override;
|
virtual QString getStatusbarDescription() override;
|
||||||
|
|
||||||
virtual QDir jarmodsPath() const;
|
virtual QDir jarmodsPath() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user