Allow disabling automated LUKS modes.

This commit is contained in:
Teo Mrnjavac 2016-09-26 13:14:54 +02:00
parent 5bf4bb8787
commit 5796b05fda
4 changed files with 40 additions and 2 deletions

View file

@ -82,12 +82,16 @@ ChoicePage::ChoicePage( QWidget* parent )
, m_beforePartitionLabelsView( nullptr )
, m_bootloaderComboBox( nullptr )
, m_lastSelectedDeviceIndex( -1 )
, m_enableEncryptionWidget( true )
{
setupUi( this );
m_defaultFsType = Calamares::JobQueue::instance()->
globalStorage()->
value( "defaultFileSystemType" ).toString();
m_enableEncryptionWidget = Calamares::JobQueue::instance()->
globalStorage()->
value( "enableLuksAutomatedPartitioning" ).toBool();
if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown )
m_defaultFsType = "ext4";
@ -884,7 +888,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
{
case Alongside:
{
m_encryptWidget->show();
if ( m_enableEncryptionWidget )
m_encryptWidget->show();
m_previewBeforeLabel->setText( tr( "Current:" ) );
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
"then drag the bottom bar to resize</strong>" ) );
@ -930,7 +935,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
case Erase:
case Replace:
{
m_encryptWidget->show();
if ( m_enableEncryptionWidget )
m_encryptWidget->show();
m_previewBeforeLabel->setText( tr( "Current:" ) );
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
m_afterPartitionBarsView->setNestedPartitionsMode( mode );