mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-27 12:25:45 -05:00
[partition] Add swap drop-down
- This is WIP; the drop-down contents should be customised, depending on configuration and the state of the device being installed-to.
This commit is contained in:
parent
c813375908
commit
a791818a65
1 changed files with 13 additions and 0 deletions
|
@ -172,6 +172,18 @@ ChoicePage::init( PartitionCoreModule* core )
|
|||
ChoicePage::applyDeviceChoice();
|
||||
}
|
||||
|
||||
static QComboBox*
|
||||
swapSelectionCombo()
|
||||
{
|
||||
QComboBox* box = new QComboBox;
|
||||
box->addItem( box->tr( "No swap" ), 0 );
|
||||
box->addItem( box->tr( "Re-use swap" ), 1 );
|
||||
box->addItem( box->tr( "Limited swap" ), 2 );
|
||||
box->addItem( box->tr( "Full swap" ), 3 );
|
||||
box->addItem( box->tr( "Swap file" ), 4 );
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ChoicePage::setupChoices creates PrettyRadioButton objects for the action
|
||||
|
@ -216,6 +228,7 @@ ChoicePage::setupChoices()
|
|||
m_eraseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionEraseAuto,
|
||||
CalamaresUtils::Original,
|
||||
iconSize ) );
|
||||
m_eraseButton->addOptionsComboBox( tr( "Swap" ), swapSelectionCombo() );
|
||||
m_grp->addButton( m_eraseButton->buttonWidget(), Erase );
|
||||
|
||||
m_replaceButton = new PrettyRadioButton;
|
||||
|
|
Loading…
Add table
Reference in a new issue