[libcalamaresui] When disable-cancel is on, never confirm
- This function is also reached by clicking the window-close decoration.
This commit is contained in:
parent
34ffc7a20a
commit
d78bc0c5c5
@ -364,14 +364,19 @@ ViewManager::back()
|
|||||||
|
|
||||||
bool ViewManager::confirmCancelInstallation()
|
bool ViewManager::confirmCancelInstallation()
|
||||||
{
|
{
|
||||||
|
const auto* const settings = Calamares::Settings::instance();
|
||||||
|
|
||||||
|
if ( settings->disableCancel() )
|
||||||
|
return false;
|
||||||
|
|
||||||
// If it's NOT the last page of the last step, we ask for confirmation
|
// If it's NOT the last page of the last step, we ask for confirmation
|
||||||
if ( !( m_currentStep == m_steps.count() -1 &&
|
if ( !( m_currentStep == m_steps.count() -1 &&
|
||||||
m_steps.last()->isAtEnd() ) )
|
m_steps.last()->isAtEnd() ) )
|
||||||
{
|
{
|
||||||
QString title = Calamares::Settings::instance()->isSetupMode()
|
QString title = settings->isSetupMode()
|
||||||
? tr( "Cancel setup?" )
|
? tr( "Cancel setup?" )
|
||||||
: tr( "Cancel installation?" );
|
: tr( "Cancel installation?" );
|
||||||
QString question = Calamares::Settings::instance()->isSetupMode()
|
QString question = settings->isSetupMode()
|
||||||
? tr( "Do you really want to cancel the current setup process?\n"
|
? tr( "Do you really want to cancel the current setup process?\n"
|
||||||
"The setup program will quit and all changes will be lost." )
|
"The setup program will quit and all changes will be lost." )
|
||||||
: tr( "Do you really want to cancel the current install process?\n"
|
: tr( "Do you really want to cancel the current install process?\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user