From 33746fa4e7e2e2d57691983e090ba6b2a3595fbd Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 7 Sep 2018 16:02:36 +0200 Subject: [PATCH] [Logout Dialog] Add "Hibernate" option We offer both Suspend and Hibernate in the application launcher so we should do the same here BUG: 398184 FIXED-IN: 5.14.0 Differential Revision: https://phabricator.kde.org/D15287 --- lookandfeel/contents/logout/Logout.qml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lookandfeel/contents/logout/Logout.qml b/lookandfeel/contents/logout/Logout.qml index c1be72d89..d32006d09 100644 --- a/lookandfeel/contents/logout/Logout.qml +++ b/lookandfeel/contents/logout/Logout.qml @@ -49,6 +49,10 @@ PlasmaCore.ColorScope { function sleepRequested() { root.suspendRequested(2); } + + function hibernateRequested() { + root.suspendRequested(4); + } property real timeout: 30 property real remainingTime: root.timeout @@ -159,15 +163,24 @@ PlasmaCore.ColorScope { text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Suspend") action: root.sleepRequested KeyNavigation.left: logoutButton - KeyNavigation.right: rebootButton + KeyNavigation.right: hibernateButton visible: spdMethods.SuspendState } + LogoutButton { + id: hibernateButton + iconSource: "system-suspend-hibernate" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Hibernate") + action: root.hibernateRequested + KeyNavigation.left: suspendButton + KeyNavigation.right: rebootButton + visible: spdMethods.HibernateState + } LogoutButton { id: rebootButton iconSource: "system-reboot" text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Reboot") action: root.rebootRequested - KeyNavigation.left: suspendButton + KeyNavigation.left: hibernateButton KeyNavigation.right: shutdownButton focus: sdtype == ShutdownType.ShutdownTypeReboot visible: maysd