b1ae6573a4
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcm_sddm?expand=0&rev=319
43 lines
2.0 KiB
Diff
43 lines
2.0 KiB
Diff
From 6e280bcc5cac94a409c2c28bc07068b4f3a95060 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 1/3] 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/package/contents/ui/Advanced.qml | 2 +-
|
|
src/sessionmodel.cpp | 6 ++++++
|
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
Index: sddm-kcm-5.17.80git.20220809T233316~d5dcd87/src/package/contents/ui/Advanced.qml
|
|
===================================================================
|
|
--- sddm-kcm-5.17.80git.20220809T233316~d5dcd87.orig/src/package/contents/ui/Advanced.qml
|
|
+++ sddm-kcm-5.17.80git.20220809T233316~d5dcd87/src/package/contents/ui/Advanced.qml
|
|
@@ -76,7 +76,7 @@ Kirigami.Page {
|
|
textRole: "name"
|
|
valueRole: "file"
|
|
onActivated: kcm.sddmSettings.session = currentValue
|
|
- onEnabledChanged: enabled ? kcm.sddmSettings.session = currentValue : kcm.sddmSettings.session = ""
|
|
+ onEnabledChanged: enabled ? kcm.sddmSettings.session = currentValue : kcm.sddmSettings.session = "default.desktop"
|
|
KCM.SettingStateBinding {
|
|
visible: autologinBox.checked
|
|
configObject: kcm.sddmSettings
|
|
Index: sddm-kcm-5.17.80git.20220809T233316~d5dcd87/src/sessionmodel.cpp
|
|
===================================================================
|
|
--- sddm-kcm-5.17.80git.20220809T233316~d5dcd87.orig/src/sessionmodel.cpp
|
|
+++ sddm-kcm-5.17.80git.20220809T233316~d5dcd87/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);
|