sddm-kcm6/0001-Support-default.session-symlink.patch

43 lines
1.7 KiB
Diff

From 015348caa1e8dd7f9c3b1490c6457017ec1b134e Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 11 Jul 2017 13:13:13 +0200
Subject: [PATCH] Support default.session symlink
Display it under a different name, otherwise it is indistinguishable from
a normal session. Use it as default when the combobox is disabled.
---
src/sessionmodel.cpp | 6 ++++++
src/ui/Advanced.qml | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
Index: sddm-kcm-6.1.5/src/sessionmodel.cpp
===================================================================
--- sddm-kcm-6.1.5.orig/src/sessionmodel.cpp
+++ sddm-kcm-6.1.5/src/sessionmodel.cpp
@@ -95,6 +95,12 @@ void SessionModel::loadDir(const QString
isHidden = line.mid(7).toLower() == QLatin1String("true");
}
}
+
+ if (session == QLatin1String( "default.desktop" )) {
+ si->name = tr("(System Default)");
+ isHidden = false;
+ }
+
if (!isHidden) {
// add to sessions list
d->sessions.push_back(si);
Index: sddm-kcm-6.1.5/src/ui/Advanced.qml
===================================================================
--- sddm-kcm-6.1.5.orig/src/ui/Advanced.qml
+++ sddm-kcm-6.1.5/src/ui/Advanced.qml
@@ -38,7 +38,7 @@ Kirigami.Page {
kcm.sddmSettings.session = autologinSession.currentText
} else {
kcm.sddmSettings.user = ""
- kcm.sddmSettings.session = ""
+ kcm.sddmSettings.session = "default.desktop"
}
// Deliberately imperative because we only want the message