|
|
|
@ -59,7 +59,8 @@ using Calamares::PrettyRadioButton;
|
|
|
|
|
using CalamaresUtils::Partition::findPartitionByPath;
|
|
|
|
|
using CalamaresUtils::Partition::isPartitionFreeSpace;
|
|
|
|
|
using CalamaresUtils::Partition::PartitionIterator;
|
|
|
|
|
using PartitionActions::Choices::SwapChoice;
|
|
|
|
|
using InstallChoice = Config::InstallChoice;
|
|
|
|
|
using SwapChoice = Config::SwapChoice;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief ChoicePage::ChoicePage is the default constructor. Called on startup as part of
|
|
|
|
@ -71,7 +72,6 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
|
|
|
|
, m_config( config )
|
|
|
|
|
, m_nextEnabled( false )
|
|
|
|
|
, m_core( nullptr )
|
|
|
|
|
, m_choice( InstallChoice::NoChoice )
|
|
|
|
|
, m_isEfi( false )
|
|
|
|
|
, m_grp( nullptr )
|
|
|
|
|
, m_alongsideButton( nullptr )
|
|
|
|
@ -83,11 +83,7 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
|
|
|
|
, m_beforePartitionBarsView( nullptr )
|
|
|
|
|
, m_beforePartitionLabelsView( nullptr )
|
|
|
|
|
, m_bootloaderComboBox( nullptr )
|
|
|
|
|
, m_lastSelectedDeviceIndex( -1 )
|
|
|
|
|
, m_enableEncryptionWidget( true )
|
|
|
|
|
, m_availableSwapChoices( config->swapChoices() )
|
|
|
|
|
, m_eraseSwapChoice( PartitionActions::Choices::pickOne( m_availableSwapChoices ) )
|
|
|
|
|
, m_allowManualPartitioning( true )
|
|
|
|
|
{
|
|
|
|
|
setupUi( this );
|
|
|
|
|
|
|
|
|
@ -95,7 +91,6 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
|
|
|
|
|
|
|
|
|
m_defaultFsType = gs->value( "defaultFileSystemType" ).toString();
|
|
|
|
|
m_enableEncryptionWidget = gs->value( "enableLuksAutomatedPartitioning" ).toBool();
|
|
|
|
|
m_allowManualPartitioning = gs->value( "allowManualPartitioning" ).toBool();
|
|
|
|
|
|
|
|
|
|
if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown )
|
|
|
|
|
{
|
|
|
|
@ -154,7 +149,7 @@ ChoicePage::init( PartitionCoreModule* core )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// We need to do this because a PCM revert invalidates the deviceModel.
|
|
|
|
|
connect( core, &PartitionCoreModule::reverted, this, [=] {
|
|
|
|
|
connect( core, &PartitionCoreModule::reverted, this, [ = ] {
|
|
|
|
|
m_drivesCombo->setModel( core->deviceModel() );
|
|
|
|
|
m_drivesCombo->setCurrentIndex( m_lastSelectedDeviceIndex );
|
|
|
|
|
} );
|
|
|
|
@ -250,10 +245,9 @@ ChoicePage::setupChoices()
|
|
|
|
|
m_replaceButton->addToGroup( m_grp, InstallChoice::Replace );
|
|
|
|
|
|
|
|
|
|
// Fill up swap options
|
|
|
|
|
// .. TODO: only if enabled in the config
|
|
|
|
|
if ( m_availableSwapChoices.count() > 1 )
|
|
|
|
|
if ( m_config->swapChoices().count() > 1 )
|
|
|
|
|
{
|
|
|
|
|
m_eraseSwapChoiceComboBox = createCombo( m_availableSwapChoices, m_eraseSwapChoice );
|
|
|
|
|
m_eraseSwapChoiceComboBox = createCombo( m_config->swapChoices(), m_config->swapChoice() );
|
|
|
|
|
m_eraseButton->addOptionsComboBox( m_eraseSwapChoiceComboBox );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -275,10 +269,10 @@ ChoicePage::setupChoices()
|
|
|
|
|
#else
|
|
|
|
|
auto buttonSignal = &QButtonGroup::idToggled;
|
|
|
|
|
#endif
|
|
|
|
|
connect( m_grp, buttonSignal, this, [this]( int id, bool checked ) {
|
|
|
|
|
connect( m_grp, buttonSignal, this, [ this ]( int id, bool checked ) {
|
|
|
|
|
if ( checked ) // An action was picked.
|
|
|
|
|
{
|
|
|
|
|
m_choice = static_cast< InstallChoice >( id );
|
|
|
|
|
m_config->setInstallChoice( id );
|
|
|
|
|
updateNextEnabled();
|
|
|
|
|
|
|
|
|
|
emit actionChosen();
|
|
|
|
@ -288,7 +282,7 @@ ChoicePage::setupChoices()
|
|
|
|
|
if ( m_grp->checkedButton() == nullptr ) // If no other action is chosen, we must
|
|
|
|
|
{
|
|
|
|
|
// set m_choice to NoChoice and reset previews.
|
|
|
|
|
m_choice = InstallChoice::NoChoice;
|
|
|
|
|
m_config->setInstallChoice( InstallChoice::NoChoice );
|
|
|
|
|
updateNextEnabled();
|
|
|
|
|
|
|
|
|
|
emit actionChosen();
|
|
|
|
@ -339,6 +333,19 @@ ChoicePage::hideButtons()
|
|
|
|
|
m_somethingElseButton->hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ChoicePage::checkInstallChoiceRadioButton( InstallChoice c )
|
|
|
|
|
{
|
|
|
|
|
QSignalBlocker b( m_grp );
|
|
|
|
|
m_grp->setExclusive( false );
|
|
|
|
|
// If c == InstallChoice::NoChoice none will match and all are deselected
|
|
|
|
|
m_eraseButton->setChecked( InstallChoice::Erase == c );
|
|
|
|
|
m_replaceButton->setChecked( InstallChoice::Replace == c );
|
|
|
|
|
m_alongsideButton->setChecked( InstallChoice::Alongside == c );
|
|
|
|
|
m_somethingElseButton->setChecked( InstallChoice::Manual == c );
|
|
|
|
|
m_grp->setExclusive( true );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief ChoicePage::applyDeviceChoice handler for the selected event of the device
|
|
|
|
@ -359,11 +366,11 @@ ChoicePage::applyDeviceChoice()
|
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
|
{
|
|
|
|
|
ScanningDialog::run(
|
|
|
|
|
QtConcurrent::run( [=] {
|
|
|
|
|
QtConcurrent::run( [ = ] {
|
|
|
|
|
QMutexLocker locker( &m_coreMutex );
|
|
|
|
|
m_core->revertAllDevices();
|
|
|
|
|
} ),
|
|
|
|
|
[this] { continueApplyDeviceChoice(); },
|
|
|
|
|
[ this ] { continueApplyDeviceChoice(); },
|
|
|
|
|
this );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -392,7 +399,14 @@ ChoicePage::continueApplyDeviceChoice()
|
|
|
|
|
// Preview setup done. Now we show/hide choices as needed.
|
|
|
|
|
setupActions();
|
|
|
|
|
|
|
|
|
|
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
|
|
|
|
|
cDebug() << "Previous device" << m_lastSelectedDeviceIndex << "new device" << m_drivesCombo->currentIndex();
|
|
|
|
|
if ( m_lastSelectedDeviceIndex != m_drivesCombo->currentIndex() )
|
|
|
|
|
{
|
|
|
|
|
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
|
|
|
|
|
m_lastSelectedActionIndex = -1;
|
|
|
|
|
m_config->setInstallChoice( m_config->initialInstallChoice() );
|
|
|
|
|
checkInstallChoiceRadioButton( m_config->installChoice() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
emit actionChosen();
|
|
|
|
|
emit deviceChosen();
|
|
|
|
@ -405,7 +419,7 @@ ChoicePage::onActionChanged()
|
|
|
|
|
Device* currd = selectedDevice();
|
|
|
|
|
if ( currd )
|
|
|
|
|
{
|
|
|
|
|
applyActionChoice( currentChoice() );
|
|
|
|
|
applyActionChoice( m_config->installChoice() );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -414,15 +428,16 @@ ChoicePage::onEraseSwapChoiceChanged()
|
|
|
|
|
{
|
|
|
|
|
if ( m_eraseSwapChoiceComboBox )
|
|
|
|
|
{
|
|
|
|
|
m_eraseSwapChoice
|
|
|
|
|
= static_cast< PartitionActions::Choices::SwapChoice >( m_eraseSwapChoiceComboBox->currentData().toInt() );
|
|
|
|
|
m_config->setSwapChoice( m_eraseSwapChoiceComboBox->currentData().toInt() );
|
|
|
|
|
onActionChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
|
|
|
|
|
ChoicePage::applyActionChoice( InstallChoice choice )
|
|
|
|
|
{
|
|
|
|
|
cDebug() << "Prev" << m_lastSelectedActionIndex << "InstallChoice" << choice
|
|
|
|
|
<< Config::installChoiceNames().find( choice );
|
|
|
|
|
m_beforePartitionBarsView->selectionModel()->disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) );
|
|
|
|
|
m_beforePartitionBarsView->selectionModel()->clearSelection();
|
|
|
|
|
m_beforePartitionBarsView->selectionModel()->clearCurrentIndex();
|
|
|
|
@ -438,16 +453,16 @@ ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
|
|
|
|
|
gs->value( "efiSystemPartition" ).toString(),
|
|
|
|
|
CalamaresUtils::GiBtoBytes(
|
|
|
|
|
gs->value( "requiredStorageGiB" ).toDouble() ),
|
|
|
|
|
m_eraseSwapChoice };
|
|
|
|
|
m_config->swapChoice() };
|
|
|
|
|
|
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
|
{
|
|
|
|
|
ScanningDialog::run(
|
|
|
|
|
QtConcurrent::run( [=] {
|
|
|
|
|
QtConcurrent::run( [ = ] {
|
|
|
|
|
QMutexLocker locker( &m_coreMutex );
|
|
|
|
|
m_core->revertDevice( selectedDevice() );
|
|
|
|
|
} ),
|
|
|
|
|
[=] {
|
|
|
|
|
[ = ] {
|
|
|
|
|
PartitionActions::doAutopartition( m_core, selectedDevice(), options );
|
|
|
|
|
emit deviceChosen();
|
|
|
|
|
},
|
|
|
|
@ -464,7 +479,7 @@ ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
|
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
|
{
|
|
|
|
|
ScanningDialog::run(
|
|
|
|
|
QtConcurrent::run( [=] {
|
|
|
|
|
QtConcurrent::run( [ = ] {
|
|
|
|
|
QMutexLocker locker( &m_coreMutex );
|
|
|
|
|
m_core->revertDevice( selectedDevice() );
|
|
|
|
|
} ),
|
|
|
|
@ -484,14 +499,14 @@ ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
|
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
|
{
|
|
|
|
|
ScanningDialog::run(
|
|
|
|
|
QtConcurrent::run( [=] {
|
|
|
|
|
QtConcurrent::run( [ = ] {
|
|
|
|
|
QMutexLocker locker( &m_coreMutex );
|
|
|
|
|
m_core->revertDevice( selectedDevice() );
|
|
|
|
|
} ),
|
|
|
|
|
[this] {
|
|
|
|
|
[ this ] {
|
|
|
|
|
// We need to reupdate after reverting because the splitter widget is
|
|
|
|
|
// not a true view.
|
|
|
|
|
updateActionChoicePreview( currentChoice() );
|
|
|
|
|
updateActionChoicePreview( m_config->installChoice() );
|
|
|
|
|
updateNextEnabled();
|
|
|
|
|
},
|
|
|
|
|
this );
|
|
|
|
@ -564,14 +579,14 @@ void
|
|
|
|
|
ChoicePage::onEncryptWidgetStateChanged()
|
|
|
|
|
{
|
|
|
|
|
EncryptWidget::Encryption state = m_encryptWidget->state();
|
|
|
|
|
if ( m_choice == InstallChoice::Erase )
|
|
|
|
|
if ( m_config->installChoice() == InstallChoice::Erase )
|
|
|
|
|
{
|
|
|
|
|
if ( state == EncryptWidget::Encryption::Confirmed || state == EncryptWidget::Encryption::Disabled )
|
|
|
|
|
{
|
|
|
|
|
applyActionChoice( m_choice );
|
|
|
|
|
applyActionChoice( m_config->installChoice() );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if ( m_choice == InstallChoice::Replace )
|
|
|
|
|
else if ( m_config->installChoice() == InstallChoice::Replace )
|
|
|
|
|
{
|
|
|
|
|
if ( m_beforePartitionBarsView && m_beforePartitionBarsView->selectionModel()->currentIndex().isValid()
|
|
|
|
|
&& ( state == EncryptWidget::Encryption::Confirmed || state == EncryptWidget::Encryption::Disabled ) )
|
|
|
|
@ -586,7 +601,7 @@ ChoicePage::onEncryptWidgetStateChanged()
|
|
|
|
|
void
|
|
|
|
|
ChoicePage::onHomeCheckBoxStateChanged()
|
|
|
|
|
{
|
|
|
|
|
if ( currentChoice() == InstallChoice::Replace
|
|
|
|
|
if ( m_config->installChoice() == InstallChoice::Replace
|
|
|
|
|
&& m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() )
|
|
|
|
|
{
|
|
|
|
|
doReplaceSelectedPartition( m_beforePartitionBarsView->selectionModel()->currentIndex() );
|
|
|
|
@ -597,12 +612,14 @@ ChoicePage::onHomeCheckBoxStateChanged()
|
|
|
|
|
void
|
|
|
|
|
ChoicePage::onLeave()
|
|
|
|
|
{
|
|
|
|
|
if ( m_choice == InstallChoice::Alongside )
|
|
|
|
|
if ( m_config->installChoice() == InstallChoice::Alongside )
|
|
|
|
|
{
|
|
|
|
|
doAlongsideApply();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( m_isEfi && ( m_choice == InstallChoice::Alongside || m_choice == InstallChoice::Replace ) )
|
|
|
|
|
if ( m_isEfi
|
|
|
|
|
&& ( m_config->installChoice() == InstallChoice::Alongside
|
|
|
|
|
|| m_config->installChoice() == InstallChoice::Replace ) )
|
|
|
|
|
{
|
|
|
|
|
QList< Partition* > efiSystemPartitions = m_core->efiSystemPartitions();
|
|
|
|
|
if ( efiSystemPartitions.count() == 1 )
|
|
|
|
@ -724,7 +741,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
|
|
|
|
// doReuseHomePartition *after* the device revert, for later use.
|
|
|
|
|
ScanningDialog::run(
|
|
|
|
|
QtConcurrent::run(
|
|
|
|
|
[this, current]( QString* homePartitionPath, bool doReuseHomePartition ) {
|
|
|
|
|
[ this, current ]( QString* homePartitionPath, bool doReuseHomePartition ) {
|
|
|
|
|
QMutexLocker locker( &m_coreMutex );
|
|
|
|
|
|
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
@ -805,7 +822,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
|
|
|
|
},
|
|
|
|
|
homePartitionPath,
|
|
|
|
|
doReuseHomePartition ),
|
|
|
|
|
[=] {
|
|
|
|
|
[ = ] {
|
|
|
|
|
m_reuseHomeCheckBox->setVisible( !homePartitionPath->isEmpty() );
|
|
|
|
|
if ( !homePartitionPath->isEmpty() )
|
|
|
|
|
m_reuseHomeCheckBox->setText( tr( "Reuse %1 as home partition for %2." )
|
|
|
|
@ -878,7 +895,7 @@ ChoicePage::updateDeviceStatePreview()
|
|
|
|
|
sm->deleteLater();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch ( m_choice )
|
|
|
|
|
switch ( m_config->installChoice() )
|
|
|
|
|
{
|
|
|
|
|
case InstallChoice::Replace:
|
|
|
|
|
case InstallChoice::Alongside:
|
|
|
|
@ -903,7 +920,7 @@ ChoicePage::updateDeviceStatePreview()
|
|
|
|
|
* @param choice the chosen partitioning action.
|
|
|
|
|
*/
|
|
|
|
|
void
|
|
|
|
|
ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
ChoicePage::updateActionChoicePreview( InstallChoice choice )
|
|
|
|
|
{
|
|
|
|
|
Device* currentDevice = selectedDevice();
|
|
|
|
|
Q_ASSERT( currentDevice );
|
|
|
|
@ -955,7 +972,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
connect( m_afterPartitionSplitterWidget,
|
|
|
|
|
&PartitionSplitterWidget::partitionResized,
|
|
|
|
|
this,
|
|
|
|
|
[this, sizeLabel]( const QString& path, qint64 size, qint64 sizeNext ) {
|
|
|
|
|
[ this, sizeLabel ]( const QString& path, qint64 size, qint64 sizeNext ) {
|
|
|
|
|
Q_UNUSED( path )
|
|
|
|
|
sizeLabel->setText(
|
|
|
|
|
tr( "%1 will be shrunk to %2MiB and a new "
|
|
|
|
@ -969,7 +986,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
m_previewAfterFrame->show();
|
|
|
|
|
m_previewAfterLabel->show();
|
|
|
|
|
|
|
|
|
|
SelectionFilter filter = [this]( const QModelIndex& index ) {
|
|
|
|
|
SelectionFilter filter = [ this ]( const QModelIndex& index ) {
|
|
|
|
|
return PartUtils::canBeResized(
|
|
|
|
|
static_cast< Partition* >( index.data( PartitionModel::PartitionPtrRole ).value< void* >() ) );
|
|
|
|
|
};
|
|
|
|
@ -1017,7 +1034,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
eraseBootloaderLabel->setText( tr( "Boot loader location:" ) );
|
|
|
|
|
|
|
|
|
|
m_bootloaderComboBox = createBootloaderComboBox( eraseWidget );
|
|
|
|
|
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, [this]() {
|
|
|
|
|
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, [ this ]() {
|
|
|
|
|
if ( !m_bootloaderComboBox.isNull() )
|
|
|
|
|
{
|
|
|
|
|
Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() );
|
|
|
|
@ -1027,7 +1044,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
m_core,
|
|
|
|
|
&PartitionCoreModule::deviceReverted,
|
|
|
|
|
this,
|
|
|
|
|
[this]( Device* dev ) {
|
|
|
|
|
[ this ]( Device* dev ) {
|
|
|
|
|
Q_UNUSED( dev )
|
|
|
|
|
if ( !m_bootloaderComboBox.isNull() )
|
|
|
|
|
{
|
|
|
|
@ -1052,13 +1069,13 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
m_previewAfterFrame->show();
|
|
|
|
|
m_previewAfterLabel->show();
|
|
|
|
|
|
|
|
|
|
if ( m_choice == InstallChoice::Erase )
|
|
|
|
|
if ( m_config->installChoice() == InstallChoice::Erase )
|
|
|
|
|
{
|
|
|
|
|
m_selectLabel->hide();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SelectionFilter filter = [this]( const QModelIndex& index ) {
|
|
|
|
|
SelectionFilter filter = [ this ]( const QModelIndex& index ) {
|
|
|
|
|
return PartUtils::canBeReplaced(
|
|
|
|
|
static_cast< Partition* >( index.data( PartitionModel::PartitionPtrRole ).value< void* >() ) );
|
|
|
|
|
};
|
|
|
|
@ -1081,7 +1098,9 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( m_isEfi && ( m_choice == InstallChoice::Alongside || m_choice == InstallChoice::Replace ) )
|
|
|
|
|
if ( m_isEfi
|
|
|
|
|
&& ( m_config->installChoice() == InstallChoice::Alongside
|
|
|
|
|
|| m_config->installChoice() == InstallChoice::Replace ) )
|
|
|
|
|
{
|
|
|
|
|
QHBoxLayout* efiLayout = new QHBoxLayout;
|
|
|
|
|
layout->addLayout( efiLayout );
|
|
|
|
@ -1096,7 +1115,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|
|
|
|
|
|
|
|
|
// Also handle selection behavior on beforeFrame.
|
|
|
|
|
QAbstractItemView::SelectionMode previewSelectionMode;
|
|
|
|
|
switch ( m_choice )
|
|
|
|
|
switch ( m_config->installChoice() )
|
|
|
|
|
{
|
|
|
|
|
case InstallChoice::Replace:
|
|
|
|
|
case InstallChoice::Alongside:
|
|
|
|
@ -1160,7 +1179,7 @@ ChoicePage::createBootloaderComboBox( QWidget* parent )
|
|
|
|
|
bcb->setModel( m_core->bootLoaderModel() );
|
|
|
|
|
|
|
|
|
|
// When the chosen bootloader device changes, we update the choice in the PCM
|
|
|
|
|
connect( bcb, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, [this]( int newIndex ) {
|
|
|
|
|
connect( bcb, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, [ this ]( int newIndex ) {
|
|
|
|
|
QComboBox* bcb = qobject_cast< QComboBox* >( sender() );
|
|
|
|
|
if ( bcb )
|
|
|
|
|
{
|
|
|
|
@ -1217,7 +1236,7 @@ ChoicePage::setupActions()
|
|
|
|
|
m_deviceInfoWidget->setPartitionTableType( PartitionTable::unknownTableType );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( m_allowManualPartitioning )
|
|
|
|
|
if ( m_config->allowManualPartitioning() )
|
|
|
|
|
{
|
|
|
|
|
m_somethingElseButton->show();
|
|
|
|
|
}
|
|
|
|
@ -1436,19 +1455,13 @@ ChoicePage::isNextEnabled() const
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChoicePage::InstallChoice
|
|
|
|
|
ChoicePage::currentChoice() const
|
|
|
|
|
{
|
|
|
|
|
return m_choice;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
ChoicePage::calculateNextEnabled() const
|
|
|
|
|
{
|
|
|
|
|
bool enabled = false;
|
|
|
|
|
auto sm_p = m_beforePartitionBarsView ? m_beforePartitionBarsView->selectionModel() : nullptr;
|
|
|
|
|
|
|
|
|
|
switch ( m_choice )
|
|
|
|
|
switch ( m_config->installChoice() )
|
|
|
|
|
{
|
|
|
|
|
case InstallChoice::NoChoice:
|
|
|
|
|
cDebug() << "No partitioning choice";
|
|
|
|
@ -1474,7 +1487,9 @@ ChoicePage::calculateNextEnabled() const
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( m_isEfi && ( m_choice == InstallChoice::Alongside || m_choice == InstallChoice::Replace ) )
|
|
|
|
|
if ( m_isEfi
|
|
|
|
|
&& ( m_config->installChoice() == InstallChoice::Alongside
|
|
|
|
|
|| m_config->installChoice() == InstallChoice::Replace ) )
|
|
|
|
|
{
|
|
|
|
|
if ( m_core->efiSystemPartitions().count() == 0 )
|
|
|
|
|
{
|
|
|
|
@ -1483,7 +1498,7 @@ ChoicePage::calculateNextEnabled() const
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( m_choice != InstallChoice::Manual && m_encryptWidget->isVisible() )
|
|
|
|
|
if ( m_config->installChoice() != InstallChoice::Manual && m_encryptWidget->isVisible() )
|
|
|
|
|
{
|
|
|
|
|
switch ( m_encryptWidget->state() )
|
|
|
|
|
{
|
|
|
|
|