From d8f6c053632434ac6f48a004f5c7445f8e77d3f08e8b8219cf5913274f78e7f7 Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Sun, 25 Oct 2015 21:24:03 +0000 Subject: [PATCH] Accepting request 340853 from home:wolfi323:test - Add set-default-session-to-plasma5-for-autologin.patch: set the default autologin session to plasma5.desktop (boo#951886) OBS-URL: https://build.opensuse.org/request/show/340853 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcm_sddm?expand=0&rev=38 --- kcm_sddm.changes | 6 +++++ kcm_sddm.spec | 3 +++ ...ult-session-to-plasma5-for-autologin.patch | 24 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 set-default-session-to-plasma5-for-autologin.patch diff --git a/kcm_sddm.changes b/kcm_sddm.changes index ba71460..a1ddee3 100644 --- a/kcm_sddm.changes +++ b/kcm_sddm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Oct 25 15:13:29 UTC 2015 - wbauer@tmo.at + +- Add set-default-session-to-plasma5-for-autologin.patch: set the + default autologin session to plasma5.desktop (boo#951886) + ------------------------------------------------------------------- Sun Oct 4 10:43:09 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/kcm_sddm.spec b/kcm_sddm.spec index 4b7aa76..e77762b 100644 --- a/kcm_sddm.spec +++ b/kcm_sddm.spec @@ -25,6 +25,8 @@ Version: 5.4.2 Release: 0 Url: https://projects.kde.org/projects/kdereview/sddm-kcm/repository Source: 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 +Patch: set-default-session-to-plasma5-for-autologin.patch BuildRequires: extra-cmake-modules BuildRequires: kauth-devel BuildRequires: kconfigwidgets-devel @@ -59,6 +61,7 @@ sddm. %lang_package %prep %setup -q -n sddm-kcm-%{version} +%patch -p1 %build %cmake_kf5 -d build diff --git a/set-default-session-to-plasma5-for-autologin.patch b/set-default-session-to-plasma5-for-autologin.patch new file mode 100644 index 0000000..929aa00 --- /dev/null +++ b/set-default-session-to-plasma5-for-autologin.patch @@ -0,0 +1,24 @@ +diff --git a/src/advanceconfig.cpp b/src/advanceconfig.cpp +index 627f1d4..10ac5c9 100644 +--- a/src/advanceconfig.cpp ++++ b/src/advanceconfig.cpp +@@ -90,7 +90,7 @@ void AdvanceConfig::load() + const QString currentUser = mConfig->group("Autologin").readEntry("User", ""); + configUi->userList->setCurrentIndex(userModel->indexOf(currentUser)); + +- const QString autologinSession = mConfig->group("Autologin").readEntry("Session", ""); ++ const QString autologinSession = mConfig->group("Autologin").readEntry("Session", "plasma5.desktop"); + configUi->sessionList->setCurrentIndex(sessionModel->indexOf(autologinSession)); + + configUi->autoLogin->setChecked(!currentUser.isEmpty()); +@@ -123,7 +123,9 @@ QVariantMap AdvanceConfig::save() + } + + args["sddm.conf/Autologin/User"] = ( configUi->autoLogin->isChecked() ) ? configUi->userList->currentText() : ""; +- args["sddm.conf/Autologin/Session"] = ( configUi->autoLogin->isChecked() ) ? configUi->sessionList->currentData() : ""; ++ if (configUi->autoLogin->isChecked()) { // only save the Autologin session if Autologin is actually enabled otherwise we would override the default session with "" if disabled ++ args["sddm.conf/Autologin/Session"] = configUi->sessionList->currentData(); ++ } + + args["sddm.conf/Autologin/Relogin"] = configUi->reloginAfterQuit->isChecked(); + //TODO session