kcm_sddm/0002-Support-default.session-symlink.patch
Fabian Vogt 2cf23fa870 - Add upstream patch to fix parsing of certain session desktop files (kde#381982):
* 0001-Session-file-parser-Support-sections-and-respect-the.patch
- Add patch to avoid showing default.desktop as duplication (kde#381982):
  * 0002-Support-default.session-symlink.patch
- Keep set-default-session-to-plasma5-for-autologin.patch as-is
  to not break on 42.2 (no default.desktop), plasma5.desktop still
  makes sense

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcm_sddm?expand=0&rev=117
2017-07-11 11:45:51 +00:00

32 lines
1.0 KiB
Diff

From dd3be6bbca6069ba04ae6f7557c0f959fc10d49c 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 2/2] 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 036711f..55f394f 100644
--- a/src/sessionmodel.cpp
+++ b/src/sessionmodel.cpp
@@ -78,6 +78,12 @@ SessionModel::SessionModel(QObject *parent) : QAbstractListModel(parent), d(new
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.13.2