mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-07 05:58:28 -04:00
polkit: fix DMS_DISABLE_POLKIT regression from qs 0.2 deprecation commit
fixes #2897
port 1.5
(cherry picked from commit 68e60f036d)
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
import Quickshell.Services.Polkit
|
||||||
|
|
||||||
|
PolkitAgent {}
|
||||||
@@ -3,7 +3,6 @@ pragma ComponentBehavior: Bound
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Services.Polkit
|
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
@@ -12,10 +11,13 @@ Singleton {
|
|||||||
readonly property bool disablePolkitIntegration: Quickshell.env("DMS_DISABLE_POLKIT") === "1"
|
readonly property bool disablePolkitIntegration: Quickshell.env("DMS_DISABLE_POLKIT") === "1"
|
||||||
|
|
||||||
readonly property bool polkitAvailable: !disablePolkitIntegration
|
readonly property bool polkitAvailable: !disablePolkitIntegration
|
||||||
readonly property alias agent: polkitAgentInstance
|
readonly property var agent: polkitAgentLoader.item
|
||||||
|
|
||||||
PolkitAgent {
|
Loader {
|
||||||
id: polkitAgentInstance
|
id: polkitAgentLoader
|
||||||
|
active: root.polkitAvailable
|
||||||
|
asynchronous: false
|
||||||
|
source: "PolkitAgentInstance.qml"
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|||||||
Reference in New Issue
Block a user