From 7060a34f73bbd26af6fabaaba4926565d78818b4 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 25 Mar 2023 23:53:16 -0500 Subject: Qt UI: Support DE choice, current as default In the Runtime Environment, we default to Plasma. In the Install Environment, we use the current desktop. Closes: #340 --- ui/qt5/horizonwizard.cc | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'ui/qt5/horizonwizard.cc') diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc index 7fefee5..68f9d41 100644 --- a/ui/qt5/horizonwizard.cc +++ b/ui/qt5/horizonwizard.cc @@ -272,7 +272,7 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) { setPage(Page_Commit, new CommitPage); #endif /* !HAS_INSTALL_ENV */ - QObject::connect(this, &QWizard::helpRequested, [=](void) { + QObject::connect(this, &QWizard::helpRequested, [=]() { if(help_id_map.find(currentId()) == help_id_map.end()) { qDebug() << "no help available for " << currentId(); QMessageBox nohelp(QMessageBox::Warning, @@ -491,6 +491,21 @@ QStringList bootForArch(const std::string &raw_disk, HorizonWizard::Arch arch, } +/*! Determine the packages to install for the specified desktop environment. */ +QString packagesForDesktop(HorizonWizard::DesktopType desktop) { + switch(desktop) { + case HorizonWizard::Plasma: + return "x11 kde calligra"; + case HorizonWizard::LXQt: + return "x11 lxqt-desktop"; + case HorizonWizard::MATE: + return "x11 mate-complete"; + case HorizonWizard::XFCE: + return "x11 xfce-desktop xfce-plugins"; + } +} + + QString HorizonWizard::toHScript() { QStringList lines; @@ -630,8 +645,8 @@ QString HorizonWizard::toHScript() { [[ fallthrough ]]; #endif case Standard: - lines << "pkginstall adelie-base-posix firefox-esr libreoffice " - "thunderbird vlc kde x11 bluez sddm docs"; + lines << "pkginstall adelie-base-posix bluez sddm docs"; + lines << ("pkginstall " + packagesForDesktop(desktopType)); lines << "svcenable bluetooth"; lines << "svcenable elogind"; lines << "svcenable sddm"; @@ -711,7 +726,7 @@ QString HorizonWizard::toHScript() { } else { lines << "firmware false"; } -#endif /* NON_LIBRE_FIRWMARE */ +#endif /* NON_LIBRE_FIRMWARE */ lines << ("timezone " + dynamic_cast(page(Page_DateTime))->selectedTimeZone()); -- cgit v1.2.3-60-g2f50