From 70b6e5f8044a35751b49db888f7af7d0710d7aaa Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sun, 12 Jun 2016 22:31:09 +0200 Subject: [PATCH] Implement PluginChecker for plugin availability --- app/qml/DevicePage.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/qml/DevicePage.qml b/app/qml/DevicePage.qml index 15426963d..213d1333f 100644 --- a/app/qml/DevicePage.qml +++ b/app/qml/DevicePage.qml @@ -60,6 +60,11 @@ Kirigami.Page Layout.fillWidth: true Kirigami.BasicListItem { + readonly property var fu: PluginChecker { + id: mprisChecker + pluginName: "mpriscontrol" + } + enabled: mprisChecker.available label: i18n("Multimedia control") onClicked: pageStack.push( "qrc:/qml/mpris.qml", @@ -67,6 +72,11 @@ Kirigami.Page ); } Kirigami.BasicListItem { + readonly property var fu: PluginChecker { + id: mousepadChecker + pluginName: "mousepad" + } + enabled: mousepadChecker.available label: i18n("Remote input") onClicked: pageStack.push( "qrc:/qml/mousepad.qml", @@ -74,6 +84,11 @@ Kirigami.Page ); } Kirigami.BasicListItem { + readonly property var fu: PluginChecker { + id: lockdeviceChecker + pluginName: "lockdevice" + } + enabled: lockdeviceChecker.available property var lockIface: LockDeviceDbusInterfaceFactory.create(deviceView.currentDevice.id()) label: lockIface.isLocked ? i18n("Unlock") : i18n("Lock") onClicked: {