summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/qt5/CMakeLists.txt4
-rw-r--r--ui/qt5/horizonwizard.cc4
-rw-r--r--ui/qt5/mountdialog.cc3
-rw-r--r--ui/qt5/partitiondiskpage.cc2
4 files changed, 6 insertions, 7 deletions
diff --git a/ui/qt5/CMakeLists.txt b/ui/qt5/CMakeLists.txt
index d277a7a..87f4d64 100644
--- a/ui/qt5/CMakeLists.txt
+++ b/ui/qt5/CMakeLists.txt
@@ -20,6 +20,7 @@ set(UI_SOURCES
partitiondiskpage.cc
partitionchoicepage.cc
partitionmanualpage.cc
+ partitionmountpage.cc
networkingpage.cc
networkifacepage.cc
netsimplewifipage.cc
@@ -53,8 +54,7 @@ IF(INSTALL)
LIST(APPEND UI_SOURCES
commitpage.cc
partitionprobe.cc
- partitionpage.cc
- partitionmountpage.cc)
+ partitionpage.cc)
ELSE(INSTALL)
LIST(APPEND UI_SOURCES writeoutpage.cc)
ENDIF(INSTALL)
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc
index 556a6f3..359e697 100644
--- a/ui/qt5/horizonwizard.cc
+++ b/ui/qt5/horizonwizard.cc
@@ -252,9 +252,7 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) {
setPage(Page_PartitionDisk, new PartitionDiskPage);
setPage(Page_PartitionChoose, new PartitionChoicePage);
setPage(Page_PartitionManual, new PartitionManualPage);
-#ifdef HAS_INSTALL_ENV
setPage(Page_PartitionMount, new PartitionMountPage);
-#endif /* HAS_INSTALL_ENV */
setPage(Page_Network, new NetworkingPage);
setPage(Page_Network_Iface, new NetworkIfacePage);
setPage(Page_Network_Wireless, new NetworkSimpleWirelessPage);
@@ -542,9 +540,7 @@ QString HorizonWizard::toHScript() {
break;
}
-#ifdef HAS_INSTALL_ENV
part_lines << (dynamic_cast<PartitionMountPage *>(page(Page_PartitionMount)))->mountLines();
-#endif /* HAS_INSTALL_ENV */
if(chosen_disk.empty()) {
lines << part_lines;
diff --git a/ui/qt5/mountdialog.cc b/ui/qt5/mountdialog.cc
index 103e442..111bce6 100644
--- a/ui/qt5/mountdialog.cc
+++ b/ui/qt5/mountdialog.cc
@@ -61,6 +61,9 @@ MountDialog::MountDialog(QStringList skipParts, QStringList skipMounts,
#else
partInput = new QLineEdit;
partInput->setWhatsThis(tr("Input the name of a partition, such as /dev/sda1, here."));
+ connect(partInput, &QLineEdit::textChanged, [=] {
+ ok->setEnabled(partInput->text().startsWith("/dev/"));
+ });
#endif
QStringList pathCandidates = {"/", "/home", "/opt", "/srv", "/usr",
diff --git a/ui/qt5/partitiondiskpage.cc b/ui/qt5/partitiondiskpage.cc
index eeb07eb..69a56f0 100644
--- a/ui/qt5/partitiondiskpage.cc
+++ b/ui/qt5/partitiondiskpage.cc
@@ -139,6 +139,6 @@ bool PartitionDiskPage::isComplete() const {
#ifdef HAS_INSTALL_ENV
return diskChooser->currentIndex().row() != -1;
#else /* !HAS_INSTALL_ENV */
- return !diskChooser->text().isEmpty();
+ return diskChooser->text().startsWith("/dev/");
#endif /* HAS_INSTALL_ENV */
}