{
switch (spdMethod) {
case Solid::PowerManagement::StandbyState:
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::StandbyState, 0, 0);
+ break;
case Solid::PowerManagement::SuspendState:
Solid::PowerManagement::requestSleep(Solid::PowerManagement::SuspendState, 0, 0);
break;
case Solid::PowerManagement::HibernateState:
Solid::PowerManagement::requestSleep(Solid::PowerManagement::HibernateState, 0, 0);
break;
+ case Solid::PowerManagement::HybridSuspendState:
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::HybridSuspendState, 0, 0);
+ break;
}
reject();
}
onClicked: {
//console.log("contour.qml: sleep requested")
timer.running = false
- if (spdMethods.SuspendState) {
+ if (spdMethods.HybridSuspendState) {
+ suspendRequested(8); // Solid::PowerManagement::HybridSuspendState
+ } else if (spdMethods.HibernateState) {
+ suspendRequested(4); // Solid::PowerManagement::HibernateState
+ } else if (spdMethods.SuspendState) {
suspendRequested(2); // Solid::PowerManagement::SuspendState
} else if (spdMethods.StandbyState) {
suspendRequested(1); // Solid::PowerManagement::StandbyState
iconSource: "system-shutdown"
anchors.right: parent.right
visible: (choose || sdtype == ShutdownType.ShutdownTypeHalt)
- menu: spdMethods.StandbyState | spdMethods.SuspendState | spdMethods.HibernateState
+ menu: spdMethods.StandbyState | spdMethods.SuspendState | spdMethods.HibernateState | spdMethods.HybridSuspendState
tabStopNext: rebootButton
tabStopBack: logoutButton
// 4 == Solid::PowerManagement::HibernateState
contextMenu.append({itemIndex: 4, itemText: i18n("Suspend to &Disk"), itemSubMenu: null, itemAllowAmpersand: false})
}
+ if (spdMethods.HybridSuspendState) {
+ // 8 == Solid::PowerManagement::HybridSuspendState
+ contextMenu.append({itemIndex: 8, itemText: i18n("&Hybrid Suspend"), itemSubMenu: null, itemAllowAmpersand: false})
+ }
contextMenu.clicked.connect(shutdownUi.suspendRequested)
}
contextMenu.open()