Skip to content
Snippets Groups Projects
Commit 45adde11 authored by Teo Mrnjavac's avatar Teo Mrnjavac
Browse files

Do not write bootloader install path if the system is EFI.

parent a65a5bfc
Branches
Tags
No related merge requests found
...@@ -57,7 +57,10 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent ) ...@@ -57,7 +57,10 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent )
, m_ui( new Ui_PartitionPage ) , m_ui( new Ui_PartitionPage )
, m_lastSelectedBootLoaderIndex(-1) , m_lastSelectedBootLoaderIndex(-1)
, m_core( core ) , m_core( core )
, m_isEfi( false )
{ {
m_isEfi = QDir( "/sys/firmware/efi/efivars" ).exists();
m_ui->setupUi( this ); m_ui->setupUi( this );
m_ui->partitionLabelsView->setVisible( m_ui->partitionLabelsView->setVisible(
Calamares::JobQueue::instance()->globalStorage()-> Calamares::JobQueue::instance()->globalStorage()->
...@@ -100,7 +103,7 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent ) ...@@ -100,7 +103,7 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent )
connect( m_ui->editButton, &QAbstractButton::clicked, this, &PartitionPage::onEditClicked ); connect( m_ui->editButton, &QAbstractButton::clicked, this, &PartitionPage::onEditClicked );
connect( m_ui->deleteButton, &QAbstractButton::clicked, this, &PartitionPage::onDeleteClicked ); connect( m_ui->deleteButton, &QAbstractButton::clicked, this, &PartitionPage::onDeleteClicked );
if ( QDir( "/sys/firmware/efi/efivars" ).exists() ) { if ( m_isEfi ) {
m_ui->bootLoaderComboBox->hide(); m_ui->bootLoaderComboBox->hide();
m_ui->label_3->hide(); m_ui->label_3->hide();
} }
...@@ -301,6 +304,9 @@ PartitionPage::editExistingPartition( Device* device, Partition* partition ) ...@@ -301,6 +304,9 @@ PartitionPage::editExistingPartition( Device* device, Partition* partition )
void void
PartitionPage::updateBootLoaderInstallPath() PartitionPage::updateBootLoaderInstallPath()
{ {
if ( m_isEfi || !m_ui->bootLoaderComboBox->isVisible() )
return;
QVariant var = m_ui->bootLoaderComboBox->currentData( BootLoaderModel::BootLoaderPathRole ); QVariant var = m_ui->bootLoaderComboBox->currentData( BootLoaderModel::BootLoaderPathRole );
if ( !var.isValid() ) if ( !var.isValid() )
return; return;
......
...@@ -66,6 +66,7 @@ private: ...@@ -66,6 +66,7 @@ private:
QMutex m_revertMutex; QMutex m_revertMutex;
int m_lastSelectedBootLoaderIndex; int m_lastSelectedBootLoaderIndex;
bool m_isEfi;
}; };
#endif // PARTITIONPAGE_H #endif // PARTITIONPAGE_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment