[libcalamares] Introduce quit-at-end
- In some cases, it makes sense to close Calamares automatically when it is done. Set *quit-at-end* to do so -- although this probably also means you should remove the *finished* page.
This commit is contained in:
parent
938277b74e
commit
1de2a4ff14
@ -188,3 +188,11 @@ disable-cancel: false
|
||||
#
|
||||
# YAML: boolean.
|
||||
disable-cancel-during-exec: false
|
||||
|
||||
# If this is set to true, then once the end of the sequence has
|
||||
# been reached, the quit (done) button is clicked automatically
|
||||
# and Calamares will close. Default is false: the user will see
|
||||
# that the end of installation has been reached, and that things are ok.
|
||||
#
|
||||
#
|
||||
quit-at-end: false
|
||||
|
@ -232,6 +232,7 @@ Settings::Settings( const QString& settingsFilePath, bool debugMode )
|
||||
m_isSetupMode = requireBool( config, "oem-setup", !m_doChroot );
|
||||
m_disableCancel = requireBool( config, "disable-cancel", false );
|
||||
m_disableCancelDuringExec = requireBool( config, "disable-cancel-during-exec", false );
|
||||
m_quitAtEnd = requireBool( config, "quit-at-end", false );
|
||||
}
|
||||
catch ( YAML::Exception& e )
|
||||
{
|
||||
|
@ -101,6 +101,9 @@ public:
|
||||
/** @brief Temporary setting of disable-cancel: can't cancel during exec. */
|
||||
bool disableCancelDuringExec() const { return m_disableCancelDuringExec; }
|
||||
|
||||
/** @brief Is quit-at-end set? (Quit automatically when done) */
|
||||
bool quitAtEnd() const { return m_quitAtEnd; }
|
||||
|
||||
private:
|
||||
static Settings* s_instance;
|
||||
|
||||
@ -117,6 +120,7 @@ private:
|
||||
bool m_promptInstall;
|
||||
bool m_disableCancel;
|
||||
bool m_disableCancelDuringExec;
|
||||
bool m_quitAtEnd;
|
||||
};
|
||||
|
||||
} // namespace Calamares
|
||||
|
@ -426,6 +426,10 @@ ViewManager::updateButtonLabels()
|
||||
m_quit->setVisible( true ); // At end, always visible and enabled.
|
||||
setButtonIcon( m_quit, "dialog-ok-apply" );
|
||||
updateCancelEnabled( true );
|
||||
if ( settings->quitAtEnd() )
|
||||
{
|
||||
m_quit->click();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user