Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
plasma5-workspace
0003-don-t-show-logout-when-kauthorized-doesn-t...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-don-t-show-logout-when-kauthorized-doesn-t-want-it.patch of Package plasma5-workspace
From acaa3f9963896a73c7ad8bbccd47662f209f8eee Mon Sep 17 00:00:00 2001 From: Marco Martin <notmart@gmail.com> Date: Tue, 30 May 2017 11:57:11 +0200 Subject: [PATCH 3/8] don't show logout when kauthorized doesn't want it BUG:380344 reviewed-by: kbroulik --- ksmserver/shutdowndlg.cpp | 2 ++ lookandfeel/contents/logout/Logout.qml | 1 + 2 files changed, 3 insertions(+) diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 3fd9a126..5e1fcf1d 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -47,6 +47,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <KPackage/Package> #include <KPackage/PackageLoader> +#include <KAuthorized> #include <KIconLoader> #include <KLocalizedString> #include <KUser> @@ -125,6 +126,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWindow* parent, mapSpdMethods->insert(QStringLiteral("SuspendState"), QVariant::fromValue(spdMethods.contains(Solid::PowerManagement::SuspendState))); mapSpdMethods->insert(QStringLiteral("HibernateState"), QVariant::fromValue(spdMethods.contains(Solid::PowerManagement::HibernateState))); context->setContextProperty(QStringLiteral("spdMethods"), mapSpdMethods); + context->setContextProperty(QStringLiteral("canLogout"), KAuthorized::authorize(QStringLiteral("logout"))); QString bootManager = KConfig(QStringLiteral(KDE_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig) .group("Shutdown") diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/logout/Logout.qml index 839c390f..e9208f3c 100644 --- a/lookandfeel/contents/logout/Logout.qml +++ b/lookandfeel/contents/logout/Logout.qml @@ -150,6 +150,7 @@ PlasmaCore.ColorScope { KeyNavigation.left: shutdownButton KeyNavigation.right: suspendButton focus: sdtype == ShutdownType.ShutdownTypeNone + visible: canLogout } } -- 2.14.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor