From c546c77040f2a591ee88d14232d645e5261739c1 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Tue, 30 Oct 2018 23:37:27 +0100 Subject: [PATCH] Add a button to open command setup menu in plasmoid Summary: This patch adds a button to the plasmoid to allow adding commands by opening the menu on the remote device. Reviewers: #vdg, nicolasfella, albertvaka Reviewed By: nicolasfella Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16535 --- plasmoid/package/contents/ui/DeviceDelegate.qml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/plasmoid/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml index 42ae110fc..08e179198 100644 --- a/plasmoid/package/contents/ui/DeviceDelegate.qml +++ b/plasmoid/package/contents/ui/DeviceDelegate.qml @@ -253,11 +253,20 @@ PlasmaComponents.ListItem } // Commands - PlasmaComponents.Label { - visible: rc.available && commandsModel.rowCount() > 0 - text: i18n("Run command") + PlasmaComponents.ListItem { + visible: rc.available + PlasmaComponents.Label { + text: i18n("Run command:") + } + PlasmaComponents.Button + { + id: addCommandButton + iconSource: "list-add" + anchors.right: parent.right + tooltip: i18n("Add command") + onClicked: rc.plugin.editCommands() + } } - Repeater { id: commandsView visible: rc.available