Accepting request 511261 from KDE:Frameworks5
(forwarded request 511247 from Vogtinator) OBS-URL: https://build.opensuse.org/request/show/511261 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kcm_sddm?expand=0&rev=42
This commit is contained in:
commit
2dbba689f4
@ -1,79 +0,0 @@
|
||||
From 65dc9de7c45d5ea4affaa6bf9e6601a000c3e321 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Tue, 11 Jul 2017 13:05:37 +0200
|
||||
Subject: [PATCH] Session file parser: Support sections and respect the Hidden
|
||||
property
|
||||
|
||||
Summary:
|
||||
Some desktop files have multiple sections, but for now we're only
|
||||
interested in [Desktop Entry]. Without this patch, every entry was seen
|
||||
as part of the [Desktop Entry] session, resulting in values getting
|
||||
overwritten.
|
||||
|
||||
Additionally, the Hidden=true property specifies that the desktop file
|
||||
needs to be treated like it was non-existant.
|
||||
|
||||
Same as https://github.com/sddm/sddm/pull/821 for sddm.
|
||||
|
||||
BUG: 381982
|
||||
|
||||
Test Plan:
|
||||
Installed the KCM, now there are no duplicate sessions and the right
|
||||
Name is shown for icewm-session.desktop.
|
||||
|
||||
Reviewers: #plasma
|
||||
|
||||
Subscribers: plasma-devel
|
||||
|
||||
Tags: #plasma
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D6626
|
||||
---
|
||||
src/sessionmodel.cpp | 22 ++++++++++++++++++++--
|
||||
1 file changed, 20 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/sessionmodel.cpp b/src/sessionmodel.cpp
|
||||
index d4aa025..9e52b12 100644
|
||||
--- a/src/sessionmodel.cpp
|
||||
+++ b/src/sessionmodel.cpp
|
||||
@@ -65,9 +65,22 @@ void SessionModel::loadDir(const QString &path, SessionType type)
|
||||
if (!inputFile.open(QIODevice::ReadOnly))
|
||||
continue;
|
||||
SessionPtr si { new Session { session, "", "", "" } };
|
||||
+ bool isHidden = false;
|
||||
+ QString current_section;
|
||||
QTextStream in(&inputFile);
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine();
|
||||
+
|
||||
+ if (line.startsWith(QLatin1String("["))) {
|
||||
+ // The section name ends before the last ] before the start of a comment
|
||||
+ int end = line.lastIndexOf(QLatin1Char(']'), line.indexOf(QLatin1Char('#')));
|
||||
+ if (end != -1)
|
||||
+ current_section = line.mid(1, end - 1);
|
||||
+ }
|
||||
+
|
||||
+ if (current_section != QLatin1String("Desktop Entry"))
|
||||
+ continue; // We are only interested in the "Desktop Entry" section
|
||||
+
|
||||
if (line.startsWith("Name=")) {
|
||||
si->name = line.mid(5);
|
||||
if (type == SessionTypeWayland) {
|
||||
@@ -79,9 +92,14 @@ void SessionModel::loadDir(const QString &path, SessionType type)
|
||||
si->exec = line.mid(5);
|
||||
if (line.startsWith("Comment="))
|
||||
si->comment = line.mid(8);
|
||||
+ if (line.startsWith(QLatin1String("Hidden=")))
|
||||
+ isHidden = line.mid(7).toLower() == QLatin1String("true");
|
||||
+ }
|
||||
+ if (!isHidden) {
|
||||
+ // add to sessions list
|
||||
+ d->sessions.push_back(si);
|
||||
}
|
||||
- // add to sessions list
|
||||
- d->sessions.push_back(si);
|
||||
+
|
||||
// close file
|
||||
inputFile.close();
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 18 16:14:47 CEST 2017 - fabian@ritter-vogt.de
|
||||
|
||||
- Update to 5.10.4
|
||||
* New bugfix release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/plasma-5.10.4.php
|
||||
- Changes since 5.10.3:
|
||||
* Session file parser: Support sections and respect the Hidden property (kde#381982)
|
||||
- Remove patches, now upstream:
|
||||
* 0001-Session-file-parser-Support-sections-and-respect-the.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 11 11:34:41 UTC 2017 - fabian@ritter-vogt.de
|
||||
|
||||
|
@ -21,14 +21,12 @@ Name: kcm_sddm
|
||||
Summary: A sddm control module for KDE
|
||||
License: GPL-2.0
|
||||
Group: System/GUI/KDE
|
||||
Version: 5.10.3
|
||||
Version: 5.10.4
|
||||
Release: 0
|
||||
Url: https://projects.kde.org/projects/kdereview/sddm-kcm/repository
|
||||
Source: http://download.kde.org/stable/plasma/%{version}/sddm-kcm-%{version}.tar.xz
|
||||
# PATCH-FIX-OPENSUSE set-default-session-to-plasma5-for-autologin.patch boo#951886 wbauer@tmo.at -- set the default autologin session to plasma5.desktop
|
||||
Patch1: set-default-session-to-plasma5-for-autologin.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch2: 0001-Session-file-parser-Support-sections-and-respect-the.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch3: 0002-Support-default.session-symlink.patch
|
||||
BuildRequires: extra-cmake-modules >= 1.0.0
|
||||
@ -68,7 +66,6 @@ sddm.
|
||||
%prep
|
||||
%setup -q -n sddm-kcm-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0c792bf29939659c660c12cb07a927cc6c81c7e623644d2491bd4534695094bd
|
||||
size 58032
|
3
sddm-kcm-5.10.4.tar.xz
Normal file
3
sddm-kcm-5.10.4.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9362e0ac66435aa14cea9ba98db0cbe337995f43d2afdca41136587b4a5b92ea
|
||||
size 58472
|
Loading…
Reference in New Issue
Block a user