Make the Create Partition dialog obey the default FS type setting.
This commit is contained in:
parent
a00ebc01e7
commit
395fb340b7
@ -77,11 +77,23 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
|
|||||||
initGptPartitionTypeUi();
|
initGptPartitionTypeUi();
|
||||||
|
|
||||||
// File system
|
// File system
|
||||||
|
FileSystem::Type defaultFsType = FileSystem::typeForName(
|
||||||
|
Calamares::JobQueue::instance()->
|
||||||
|
globalStorage()->
|
||||||
|
value( "defaultFileSystemType" ).toString() );
|
||||||
|
int defaultFsIndex = -1;
|
||||||
|
int fsCounter = 0;
|
||||||
QStringList fsNames;
|
QStringList fsNames;
|
||||||
for ( auto fs : FileSystemFactory::map() )
|
for ( auto fs : FileSystemFactory::map() )
|
||||||
{
|
{
|
||||||
if ( fs->supportCreate() != FileSystem::cmdSupportNone && fs->type() != FileSystem::Extended )
|
if ( fs->supportCreate() != FileSystem::cmdSupportNone &&
|
||||||
|
fs->type() != FileSystem::Extended )
|
||||||
|
{
|
||||||
fsNames << fs->name();
|
fsNames << fs->name();
|
||||||
|
if ( fs->type() == defaultFsType )
|
||||||
|
defaultFsIndex = fsCounter;
|
||||||
|
fsCounter++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_ui->fsComboBox->addItems( fsNames );
|
m_ui->fsComboBox->addItems( fsNames );
|
||||||
|
|
||||||
@ -89,6 +101,9 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
|
|||||||
connect( m_ui->fsComboBox, SIGNAL( activated( int ) ), SLOT( updateMountPointUi() ) );
|
connect( m_ui->fsComboBox, SIGNAL( activated( int ) ), SLOT( updateMountPointUi() ) );
|
||||||
connect( m_ui->extendedRadioButton, SIGNAL( toggled( bool ) ), SLOT( updateMountPointUi() ) );
|
connect( m_ui->extendedRadioButton, SIGNAL( toggled( bool ) ), SLOT( updateMountPointUi() ) );
|
||||||
|
|
||||||
|
// Select a default
|
||||||
|
m_ui->fsComboBox->setCurrentIndex( defaultFsIndex );
|
||||||
|
|
||||||
setupFlagsList();
|
setupFlagsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user