kcm_sddm/0001-Support-default.session-symlink.patch

32 lines
1012 B
Diff
Raw Normal View History

From 63f7e6b7b0ce899f9dcc8e4b7fc8aba071175ffb 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.
---
src/sessionmodel.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/sessionmodel.cpp b/src/sessionmodel.cpp
index 0bbe217..429d664 100644
--- a/src/sessionmodel.cpp
+++ b/src/sessionmodel.cpp
@@ -96,6 +96,12 @@ void SessionModel::loadDir(const QString &path, SessionType type)
if (line.startsWith(QLatin1String("Hidden=")))
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);
--
2.21.0