summaryrefslogtreecommitdiff
path: root/ui/qt5/horizonwizard.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-03-25 23:53:16 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-03-25 23:53:16 -0500
commit7060a34f73bbd26af6fabaaba4926565d78818b4 (patch)
tree04fb8979b6e2328704a272d3f4bd0791bca39b29 /ui/qt5/horizonwizard.cc
parent9fb439ac12c81a3d58eecd30de2b2655b27c6f38 (diff)
downloadhorizon-7060a34f73bbd26af6fabaaba4926565d78818b4.tar.gz
horizon-7060a34f73bbd26af6fabaaba4926565d78818b4.tar.bz2
horizon-7060a34f73bbd26af6fabaaba4926565d78818b4.tar.xz
horizon-7060a34f73bbd26af6fabaaba4926565d78818b4.zip
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
Diffstat (limited to 'ui/qt5/horizonwizard.cc')
-rw-r--r--ui/qt5/horizonwizard.cc23
1 files changed, 19 insertions, 4 deletions
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<DateTimePage *>(page(Page_DateTime))->selectedTimeZone());