|
|
@ -83,7 +83,6 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
|
|
|
, m_beforePartitionBarsView( nullptr )
|
|
|
|
, m_beforePartitionBarsView( nullptr )
|
|
|
|
, m_beforePartitionLabelsView( nullptr )
|
|
|
|
, m_beforePartitionLabelsView( nullptr )
|
|
|
|
, m_bootloaderComboBox( nullptr )
|
|
|
|
, m_bootloaderComboBox( nullptr )
|
|
|
|
, m_lastSelectedDeviceIndex( -1 )
|
|
|
|
|
|
|
|
, m_enableEncryptionWidget( true )
|
|
|
|
, m_enableEncryptionWidget( true )
|
|
|
|
, m_availableSwapChoices( config->swapChoices() )
|
|
|
|
, m_availableSwapChoices( config->swapChoices() )
|
|
|
|
, m_eraseSwapChoice( config->initialSwapChoice() )
|
|
|
|
, m_eraseSwapChoice( config->initialSwapChoice() )
|
|
|
@ -339,6 +338,38 @@ ChoicePage::hideButtons()
|
|
|
|
m_somethingElseButton->hide();
|
|
|
|
m_somethingElseButton->hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
ChoicePage::checkInstallChoiceRadioButton( InstallChoice c )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QSignalBlocker b( m_grp );
|
|
|
|
|
|
|
|
PrettyRadioButton* button = nullptr;
|
|
|
|
|
|
|
|
switch ( c )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
case InstallChoice::Alongside:
|
|
|
|
|
|
|
|
button = m_alongsideButton;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case InstallChoice::Replace:
|
|
|
|
|
|
|
|
button = m_replaceButton;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case InstallChoice::Erase:
|
|
|
|
|
|
|
|
button = m_eraseButton;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case InstallChoice::Manual:
|
|
|
|
|
|
|
|
button = m_somethingElseButton;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case InstallChoice::NoChoice:
|
|
|
|
|
|
|
|
// Nothing
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_grp->setExclusive( false );
|
|
|
|
|
|
|
|
m_eraseButton->setChecked( button == m_eraseButton );
|
|
|
|
|
|
|
|
m_replaceButton->setChecked( button == m_replaceButton );
|
|
|
|
|
|
|
|
m_alongsideButton->setChecked( button == m_alongsideButton );
|
|
|
|
|
|
|
|
m_somethingElseButton->setChecked( button == m_somethingElseButton );
|
|
|
|
|
|
|
|
m_grp->setExclusive( true );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief ChoicePage::applyDeviceChoice handler for the selected event of the device
|
|
|
|
* @brief ChoicePage::applyDeviceChoice handler for the selected event of the device
|
|
|
@ -392,7 +423,14 @@ ChoicePage::continueApplyDeviceChoice()
|
|
|
|
// Preview setup done. Now we show/hide choices as needed.
|
|
|
|
// Preview setup done. Now we show/hide choices as needed.
|
|
|
|
setupActions();
|
|
|
|
setupActions();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cDebug() << "Previous device" << m_lastSelectedDeviceIndex << "new device" << m_drivesCombo->currentIndex();
|
|
|
|
|
|
|
|
if ( m_lastSelectedDeviceIndex != m_drivesCombo->currentIndex() )
|
|
|
|
|
|
|
|
{
|
|
|
|
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
|
|
|
|
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
|
|
|
|
|
|
|
|
m_lastSelectedActionIndex = -1;
|
|
|
|
|
|
|
|
m_choice = m_config->initialInstallChoice();
|
|
|
|
|
|
|
|
checkInstallChoiceRadioButton( m_choice );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
emit actionChosen();
|
|
|
|
emit actionChosen();
|
|
|
|
emit deviceChosen();
|
|
|
|
emit deviceChosen();
|
|
|
@ -423,6 +461,8 @@ ChoicePage::onEraseSwapChoiceChanged()
|
|
|
|
void
|
|
|
|
void
|
|
|
|
ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
|
|
|
|
ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
cDebug() << "Prev" << m_lastSelectedActionIndex << "InstallChoice" << choice
|
|
|
|
|
|
|
|
<< PartitionActions::Choices::installChoiceNames().find( choice );
|
|
|
|
m_beforePartitionBarsView->selectionModel()->disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) );
|
|
|
|
m_beforePartitionBarsView->selectionModel()->disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) );
|
|
|
|
m_beforePartitionBarsView->selectionModel()->clearSelection();
|
|
|
|
m_beforePartitionBarsView->selectionModel()->clearSelection();
|
|
|
|
m_beforePartitionBarsView->selectionModel()->clearCurrentIndex();
|
|
|
|
m_beforePartitionBarsView->selectionModel()->clearCurrentIndex();
|
|
|
|