diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 5f2e156e..29ed9c5c 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1243,6 +1243,8 @@ "click-again": "Click again to execute immediately", "action-in-seconds": "{action} in {seconds} seconds...", "lock-subtitle": "Lock your session", + "lock-and-suspend": "Lock and Suspend", + "lock-and-suspend-subtitle": "Lock session and put system to sleep", "end-subtitle": "End your session", "lock": "Lock", "suspend": "Suspend", diff --git a/Commons/TablerIcons.qml b/Commons/TablerIcons.qml index 13b60e33..b10e66f8 100644 --- a/Commons/TablerIcons.qml +++ b/Commons/TablerIcons.qml @@ -45,6 +45,7 @@ Singleton { "keyboard": "keyboard", "shutdown": "power", "lock": "lock", + "lock-pause": "lock-pause", "logout": "logout", "reboot": "refresh", "suspend": "player-pause", diff --git a/Modules/SessionMenu/SessionMenu.qml b/Modules/SessionMenu/SessionMenu.qml index 0a9c2271..05b92b68 100644 --- a/Modules/SessionMenu/SessionMenu.qml +++ b/Modules/SessionMenu/SessionMenu.qml @@ -14,7 +14,7 @@ NPanel { id: root preferredWidth: 440 - preferredHeight: 410 + preferredHeight: 480 panelAnchorHorizontalCenter: true panelAnchorVerticalCenter: true panelKeyboardFocus: true @@ -32,6 +32,11 @@ NPanel { "icon": "lock", "title": I18n.tr("session-menu.lock"), "subtitle": I18n.tr("session-menu.lock-subtitle") + }, { + "action": "lockAndSuspend", + "icon": "lock-pause", + "title": I18n.tr("session-menu.lock-and-suspend"), + "subtitle": I18n.tr("session-menu.lock-and-suspend-subtitle") }, { "action": "suspend", "icon": "suspend", @@ -97,6 +102,12 @@ NPanel { lockScreen.active = true } break + case "lockAndSuspend": + if (!lockScreen.active) { + lockScreen.active = true + } + CompositorService.suspend() + break case "suspend": CompositorService.suspend() break diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index 93cd9c49..c5f20cc2 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -251,10 +251,4 @@ ColumnLayout { } } } - - NDivider { - Layout.fillWidth: true - Layout.topMargin: Style.marginXL * scaling - Layout.bottomMargin: Style.marginXL * scaling - } } diff --git a/Services/NotificationService.qml b/Services/NotificationService.qml index 3a9b6423..7eaf6f6b 100644 --- a/Services/NotificationService.qml +++ b/Services/NotificationService.qml @@ -115,7 +115,7 @@ Singleton { "id": id, "summary": (n.summary || ""), "body": stripTags(n.body || ""), - "appName": getAppName(n.appName || n.desktopEntry || ""), + "appName": getAppName(n.appName), "urgency": n.urgency < 0 || n.urgency > 2 ? 1 : n.urgency, "expireTimeout": n.expireTimeout, "timestamp": time,