Show efi mountpoint when creating/editing partitions
This commit is contained in:
parent
d41ba1da79
commit
6a52811c30
@ -26,6 +26,8 @@
|
|||||||
#include <ui_CreatePartitionDialog.h>
|
#include <ui_CreatePartitionDialog.h>
|
||||||
|
|
||||||
#include <utils/Logger.h>
|
#include <utils/Logger.h>
|
||||||
|
#include "GlobalStorage.h"
|
||||||
|
#include "JobQueue.h"
|
||||||
|
|
||||||
// CalaPM
|
// CalaPM
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
@ -35,6 +37,7 @@
|
|||||||
|
|
||||||
// Qt
|
// Qt
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
#include <QDir>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
|
||||||
static QSet< FileSystem::Type > s_unmountableFS(
|
static QSet< FileSystem::Type > s_unmountableFS(
|
||||||
@ -52,6 +55,14 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
|
|||||||
{
|
{
|
||||||
m_ui->setupUi( this );
|
m_ui->setupUi( this );
|
||||||
|
|
||||||
|
QStringList mountPoints;
|
||||||
|
mountPoints << "/" << "/boot" << "/home" << "/opt" << "/usr" << "/var";
|
||||||
|
if ( QDir( "/sys/firmware/efi/efivars" ).exists() )
|
||||||
|
mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString();
|
||||||
|
mountPoints.removeDuplicates();
|
||||||
|
mountPoints.sort();
|
||||||
|
m_ui->mountPointComboBox->addItems( mountPoints );
|
||||||
|
|
||||||
if ( device->partitionTable()->type() == PartitionTable::msdos )
|
if ( device->partitionTable()->type() == PartitionTable::msdos )
|
||||||
initMbrPartitionTypeUi();
|
initMbrPartitionTypeUi();
|
||||||
else
|
else
|
||||||
|
@ -130,36 +130,6 @@
|
|||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>-1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/boot</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/home</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/opt</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/usr</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/var</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="7" column="0">
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include <ui_EditExistingPartitionDialog.h>
|
#include <ui_EditExistingPartitionDialog.h>
|
||||||
|
|
||||||
#include <utils/Logger.h>
|
#include <utils/Logger.h>
|
||||||
|
#include "GlobalStorage.h"
|
||||||
|
#include "JobQueue.h"
|
||||||
|
|
||||||
// CalaPM
|
// CalaPM
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
@ -35,6 +37,7 @@
|
|||||||
|
|
||||||
// Qt
|
// Qt
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partition* partition, QWidget* parentWidget )
|
EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partition* partition, QWidget* parentWidget )
|
||||||
: QDialog( parentWidget )
|
: QDialog( parentWidget )
|
||||||
@ -45,6 +48,14 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partit
|
|||||||
{
|
{
|
||||||
m_ui->setupUi( this );
|
m_ui->setupUi( this );
|
||||||
|
|
||||||
|
QStringList mountPoints;
|
||||||
|
mountPoints << "/" << "/boot" << "/home" << "/opt" << "/usr" << "/var";
|
||||||
|
if ( QDir( "/sys/firmware/efi/efivars" ).exists() )
|
||||||
|
mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString();
|
||||||
|
mountPoints.removeDuplicates();
|
||||||
|
mountPoints.sort();
|
||||||
|
m_ui->mountPointComboBox->addItems( mountPoints );
|
||||||
|
|
||||||
QColor color = ColorUtils::colorForPartition( m_partition );
|
QColor color = ColorUtils::colorForPartition( m_partition );
|
||||||
m_partitionSizeController->init( m_device, m_partition, color );
|
m_partitionSizeController->init( m_device, m_partition, color );
|
||||||
m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox );
|
m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox );
|
||||||
|
@ -105,36 +105,6 @@
|
|||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>-1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/boot</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/home</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/opt</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/usr</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>/var</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
|
Loading…
Reference in New Issue
Block a user