summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-24 21:36:17 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-24 21:36:17 -0500
commite355395ee830bdffe3f88c39c77e3aca2043a19c (patch)
tree47ce3a1d7d5f2fd808fc97cef9e774deac1d3175
parent36541505b3e9829614de34da1afa3b72687dc042 (diff)
downloadhorizon-e355395ee830bdffe3f88c39c77e3aca2043a19c.tar.gz
horizon-e355395ee830bdffe3f88c39c77e3aca2043a19c.tar.bz2
horizon-e355395ee830bdffe3f88c39c77e3aca2043a19c.tar.xz
horizon-e355395ee830bdffe3f88c39c77e3aca2043a19c.zip
Qt UI: Fix a few issues with the Runtime wizard
-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 */
}