[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
wilder-5.14
Kai Uwe Broulik 8 years ago
parent 0a56e67cd5
commit 33746fa4e7
  1. 17
      lookandfeel/contents/logout/Logout.qml

@ -50,6 +50,10 @@ PlasmaCore.ColorScope {
root.suspendRequested(2); root.suspendRequested(2);
} }
function hibernateRequested() {
root.suspendRequested(4);
}
property real timeout: 30 property real timeout: 30
property real remainingTime: root.timeout property real remainingTime: root.timeout
property var currentAction: { property var currentAction: {
@ -159,15 +163,24 @@ PlasmaCore.ColorScope {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Suspend") text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Suspend")
action: root.sleepRequested action: root.sleepRequested
KeyNavigation.left: logoutButton KeyNavigation.left: logoutButton
KeyNavigation.right: rebootButton KeyNavigation.right: hibernateButton
visible: spdMethods.SuspendState 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 { LogoutButton {
id: rebootButton id: rebootButton
iconSource: "system-reboot" iconSource: "system-reboot"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Reboot") text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Reboot")
action: root.rebootRequested action: root.rebootRequested
KeyNavigation.left: suspendButton KeyNavigation.left: hibernateButton
KeyNavigation.right: shutdownButton KeyNavigation.right: shutdownButton
focus: sdtype == ShutdownType.ShutdownTypeReboot focus: sdtype == ShutdownType.ShutdownTypeReboot
visible: maysd visible: maysd

Loading…
Cancel
Save