diff --git a/resources/cl-install-gui.png b/resources/cl-install-gui.png index 7ca80e6..31c5826 100644 Binary files a/resources/cl-install-gui.png and b/resources/cl-install-gui.png differ diff --git a/resources/img/calculate-icon.png b/resources/img/calculate-icon.png index 0742e64..31c5826 100644 Binary files a/resources/img/calculate-icon.png and b/resources/img/calculate-icon.png differ diff --git a/src/calculateconfig.cpp b/src/calculateconfig.cpp index 50e16aa..e1650ba 100644 --- a/src/calculateconfig.cpp +++ b/src/calculateconfig.cpp @@ -123,9 +123,30 @@ bool CalculateConfig::getNewPartitioning() } QStringList devs = confDisk["os_device_dev"].toStringList(); + m_Config.remove("os_device_dev"); m_Config["os_device_dev"] = preparePartitions(devs); + QStringList os_disk_dev = confDisk["os_disk_dev"].toStringList(); + m_Config.remove("os_disk_dev"); + m_Config["os_disk_dev"] = os_disk_dev; + + QStringList os_disk_format = confDisk["os_disk_format"].toStringList(); + m_Config.remove("os_disk_format"); + m_Config["os_disk_format"] = os_disk_format; + + QStringList os_disk_name = confDisk["os_disk_name"].toStringList(); + m_Config.remove("os_disk_name"); + m_Config["os_disk_name"] = os_disk_name; + + QStringList os_disk_part = confDisk["os_disk_part"].toStringList(); + m_Config.remove("os_disk_part"); + m_Config["os_disk_part"] = os_disk_part; + + QStringList os_disk_size = confDisk["os_disk_size"].toStringList(); + m_Config.remove("os_disk_size"); + m_Config["os_disk_size"] = os_disk_size; + return true; } diff --git a/src/systeminstaller.cpp b/src/systeminstaller.cpp index a231b43..20a5e04 100644 --- a/src/systeminstaller.cpp +++ b/src/systeminstaller.cpp @@ -254,6 +254,20 @@ void SystemInstaller::changeEvent(QEvent* event) QWidget::changeEvent(event); } +void SystemInstaller::closeEvent ( QCloseEvent* event ) +{ + if ( QMessageBox::question(this, tr("Attention"), tr("Do you want to abort the installation now?"), + QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes ) + { + qDebug() << "Canceled by user."; + event->accept(); + } + else + { + event->ignore(); + } +} + void SystemInstaller::changeNext(bool state) { @@ -314,3 +328,4 @@ void SystemInstaller::showCmd( QStringList params ) } } + diff --git a/src/systeminstaller.h b/src/systeminstaller.h index b0365fd..97f709b 100644 --- a/src/systeminstaller.h +++ b/src/systeminstaller.h @@ -26,6 +26,7 @@ public: protected: void changeEvent(QEvent* event); + void closeEvent(QCloseEvent* event); private: void setupUi();