- Added fix-sddm-theme-logic.diff so sddm offers the text entry boxes

by default (instead of an empty user list) when the userlist model
  is empty (boo#1003742)

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=265
This commit is contained in:
Fabian Vogt 2016-10-21 16:03:27 +00:00 committed by Git OBS Bridge
parent 6bdd36bf2b
commit ff8a199cf8
3 changed files with 66 additions and 3 deletions

53
fix-sddm-theme-logic.diff Normal file
View File

@ -0,0 +1,53 @@
From 70fc5cc70281abad8e50ae17a9d0d90817488813 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <larrosa@kde.org>
Date: Fri, 21 Oct 2016 14:33:04 +0200
Subject: [PATCH] Directly show the username/password textboxes when user list
is empty
Summary:
If the user list is empty (for example, because regular users are hidden
or sddm's configuration includes something like MinimumUid=2000)
show directly the username/password textboxes instead of an empty
user list.
Test Plan:
I edited /etc/sddm.conf and added MinimumUid=2000 to the [Users] group,
then restarted sddm.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3128
---
sddm-theme/Main.qml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml
index 4230cbe..9078743 100644
--- a/sddm-theme/Main.qml
+++ b/sddm-theme/Main.qml
@@ -90,7 +90,15 @@ PlasmaCore.ColorScope {
id: userListComponent
userListModel: userModel
userListCurrentIndex: userModel.lastIndex >= 0 ? userModel.lastIndex : 0
- showUserList: (userListModel.count && userListModel.disableAvatarsThreshold) ? userListModel.count <= userListModel.disableAvatarsThreshold : true
+ showUserList: {
+ if ( !userListModel.hasOwnProperty("count")
+ || !userListModel.hasOwnProperty("disableAvatarsThreshold"))
+ return true
+
+ if ( userListModel.count == 0 ) return false
+
+ return userListModel.count <= userListModel.disableAvatarsThreshold
+ }
notificationMessage: {
var text = ""
--
2.10.1

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Oct 21 12:30:48 UTC 2016 - alarrosa@suse.com
- Added fix-sddm-theme-logic.diff so sddm offers the text entry boxes
by default (instead of an empty user list) when the userlist model
is empty (boo#1003742)
-------------------------------------------------------------------
Tue Oct 18 15:16:03 UTC 2016 - fabian@ritter-vogt.de

View File

@ -37,9 +37,11 @@ Patch1: change-kioremote-severity.patch
Patch2: 0001-Ignore-default-sddm-face-icons.patch
# PATCH-FIX-OPENSUSE add-tray-icon-cache.patch kde#356479 fabian@ritter-vogt.de -- Workaround for high load due to animated tray icons
Patch3: add-tray-icon-cache.patch
# PATCH-FIX-UPSTREAM keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff alarrosa@suse.com -- Keep wallpaper aspect ratio on screen resolution change
Patch4: keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff
# PATCHES 100-200 and above are from upstream 5.8 branch
# PATCH-FIX-UPSTREAM keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff alarrosa@suse.com -- Keep wallpaper aspect ratio on screen resolution change
Patch100: keep-wallpaper-aspect-ratio-wallpaper-on-screen-resolution-change.diff
# PATCH-FIX-UPSTREAM fix-sddm-theme-logic.diff boo#1003742 alarrosa@suse.com -- Fix sddm logic to use avatar list or text entry when usermodel.count is 0
Patch101: fix-sddm-theme-logic.diff
# PATCHES 201-300 and above are from upstream master/5.9 branch
BuildRequires: breeze5-icons
BuildRequires: fdupes
@ -210,7 +212,8 @@ workspace. Development files.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch100 -p1
%patch101 -p1
%build
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}