[libcalamares] Rename dontCancel to disableCancelDuringExec
- This way the name actually refers to what it does, rather than being a somewhat ambiguous overload of disableCancel.
This commit is contained in:
parent
4de703430f
commit
f3bfc81e52
@ -185,7 +185,7 @@ Settings::Settings( const QString& settingsFilePath,
|
||||
, m_doChroot( true )
|
||||
, m_promptInstall( false )
|
||||
, m_disableCancel( false )
|
||||
, m_dontCancel( false )
|
||||
, m_disableCancelDuringExec( false )
|
||||
{
|
||||
cDebug() << "Using Calamares settings file at" << settingsFilePath;
|
||||
QFile file( settingsFilePath );
|
||||
@ -207,7 +207,7 @@ Settings::Settings( const QString& settingsFilePath,
|
||||
m_doChroot = !requireBool( config, "dont-chroot", false );
|
||||
m_isSetupMode = requireBool( config, "oem-setup", !m_doChroot );
|
||||
m_disableCancel = requireBool( config, "disable-cancel", false );
|
||||
m_dontCancel = requireBool( config, "disable-cancel-during-exec", false );
|
||||
m_disableCancelDuringExec = requireBool( config, "disable-cancel-during-exec", false );
|
||||
}
|
||||
catch ( YAML::Exception& e )
|
||||
{
|
||||
@ -277,9 +277,9 @@ Settings::disableCancel() const
|
||||
}
|
||||
|
||||
bool
|
||||
Settings::dontCancel() const
|
||||
Settings::disableCancelDuringExec() const
|
||||
{
|
||||
return m_dontCancel;
|
||||
return m_disableCancelDuringExec;
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
/** @brief Global setting of disable-cancel: can't cancel ever. */
|
||||
bool disableCancel() const;
|
||||
/** @brief Temporary setting of disable-cancel: can't cancel during exec. */
|
||||
bool dontCancel() const;
|
||||
bool disableCancelDuringExec() const;
|
||||
|
||||
private:
|
||||
static Settings* s_instance;
|
||||
@ -85,7 +85,7 @@ private:
|
||||
bool m_isSetupMode;
|
||||
bool m_promptInstall;
|
||||
bool m_disableCancel;
|
||||
bool m_dontCancel;
|
||||
bool m_disableCancelDuringExec;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ ViewManager::next()
|
||||
m_steps.at( m_currentStep )->onActivate();
|
||||
executing = qobject_cast< ExecutionViewStep* >( m_steps.at( m_currentStep ) ) != nullptr;
|
||||
emit currentStepChanged();
|
||||
updateCancelEnabled( !settings->disableCancel() && !(executing && settings->dontCancel() ) );
|
||||
updateCancelEnabled( !settings->disableCancel() && !(executing && settings->disableCancelDuringExec() ) );
|
||||
}
|
||||
else
|
||||
step->next();
|
||||
@ -331,7 +331,7 @@ ViewManager::updateButtonLabels()
|
||||
{
|
||||
if ( settings->disableCancel() )
|
||||
m_quit->setVisible( false ); // In case we went back from final
|
||||
updateCancelEnabled( !settings->disableCancel() && !( stepIsExecute( m_steps, m_currentStep ) && settings->dontCancel() ) );
|
||||
updateCancelEnabled( !settings->disableCancel() && !( stepIsExecute( m_steps, m_currentStep ) && settings->disableCancelDuringExec() ) );
|
||||
|
||||
m_quit->setText( tr( "&Cancel" ) );
|
||||
m_quit->setToolTip( quit );
|
||||
@ -369,7 +369,7 @@ bool ViewManager::confirmCancelInstallation()
|
||||
|
||||
if ( settings->disableCancel() )
|
||||
return false;
|
||||
if ( settings->dontCancel() && stepIsExecute( m_steps, m_currentStep ) )
|
||||
if ( settings->disableCancelDuringExec() && stepIsExecute( m_steps, m_currentStep ) )
|
||||
return false;
|
||||
|
||||
// If it's NOT the last page of the last step, we ask for confirmation
|
||||
|
Loading…
Reference in New Issue
Block a user