add possibility to pre check encryption checkox
This commit is contained in:
parent
131b2eded1
commit
70a59d6cd1
@ -698,6 +698,8 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
Calamares::getBool( configurationMap, "alwaysShowPartitionLabels", true ) );
|
||||
gs->insert( "enableLuksAutomatedPartitioning",
|
||||
Calamares::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) );
|
||||
gs->insert( "preCheckEncryption",
|
||||
Calamares::getBool( configurationMap, "preCheckEncryption", false ) );
|
||||
|
||||
QString partitionTableName = Calamares::getString( configurationMap, "defaultPartitionTableType" );
|
||||
if ( partitionTableName.isEmpty() )
|
||||
|
@ -83,12 +83,14 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
||||
, m_beforePartitionLabelsView( nullptr )
|
||||
, m_bootloaderComboBox( nullptr )
|
||||
, m_enableEncryptionWidget( true )
|
||||
, m_preCheckEncryption( false )
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
auto gs = Calamares::JobQueue::instance()->globalStorage();
|
||||
|
||||
m_enableEncryptionWidget = gs->value( "enableLuksAutomatedPartitioning" ).toBool();
|
||||
m_preCheckEncryption = gs->value( "preCheckEncryption" ).toBool();
|
||||
|
||||
// Set up drives combo
|
||||
m_mainLayout->setDirection( QBoxLayout::TopToBottom );
|
||||
@ -468,6 +470,11 @@ ChoicePage::onActionChanged()
|
||||
{
|
||||
m_encryptWidget->setFilesystem( FileSystem::typeForName( m_replaceFsTypesChoiceComboBox->currentText() ) );
|
||||
}
|
||||
|
||||
if ( m_preCheckEncryption )
|
||||
{
|
||||
m_encryptWidget->setEncryptionCheckbox( m_preCheckEncryption );
|
||||
}
|
||||
}
|
||||
|
||||
Device* currd = selectedDevice();
|
||||
|
@ -170,6 +170,7 @@ private:
|
||||
int m_lastSelectedDeviceIndex = -1;
|
||||
|
||||
bool m_enableEncryptionWidget = false;
|
||||
bool m_preCheckEncryption = false;
|
||||
|
||||
QMutex m_coreMutex;
|
||||
};
|
||||
|
@ -70,6 +70,11 @@ EncryptWidget::EncryptWidget( QWidget* parent )
|
||||
CALAMARES_RETRANSLATE_SLOT( &EncryptWidget::retranslate );
|
||||
}
|
||||
|
||||
void EncryptWidget::setEncryptionCheckbox( bool preCheckEncrypt)
|
||||
{
|
||||
m_ui->m_encryptCheckBox->setChecked( preCheckEncrypt );
|
||||
}
|
||||
|
||||
void
|
||||
EncryptWidget::reset( bool checkVisible )
|
||||
{
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
|
||||
explicit EncryptWidget( QWidget* parent = nullptr );
|
||||
|
||||
void setEncryptionCheckbox( bool preCheckEncrypt = false);
|
||||
void reset( bool checkVisible = true );
|
||||
|
||||
Encryption state() const;
|
||||
|
@ -240,6 +240,11 @@ defaultFileSystemType: "ext4"
|
||||
# If nothing is specified, LUKS is enabled in automated modes.
|
||||
#enableLuksAutomatedPartitioning: true
|
||||
|
||||
# When enableLuksAutomatedPartitioning is true, this option will pre-check
|
||||
# encryption checkbox. This option is only usefull to help people to not forget
|
||||
# to cypher their disk when installing in enterprise (for exemple).
|
||||
#preCheckEncryption: false
|
||||
|
||||
# Partition layout.
|
||||
#
|
||||
# This optional setting specifies a custom partition layout.
|
||||
|
@ -34,6 +34,7 @@ properties:
|
||||
|
||||
luksGeneration: { type: string, enum: [luks1, luks2] } # Also allows "luks" as alias of "luks1"
|
||||
enableLuksAutomatedPartitioning: { type: boolean, default: false }
|
||||
preCheckEncryption: { type: boolean, default: false }
|
||||
|
||||
allowManualPartitioning: { type: boolean, default: true }
|
||||
showNotEncryptedBootMessage: { type: boolean, default: true }
|
||||
|
Loading…
Reference in New Issue
Block a user