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
This commit is contained in:
Billy Laws 2018-10-30 23:37:27 +01:00 committed by Nicolas Fella
parent e6d84ece34
commit c546c77040

View file

@ -253,11 +253,20 @@ PlasmaComponents.ListItem
} }
// Commands // Commands
PlasmaComponents.Label { PlasmaComponents.ListItem {
visible: rc.available && commandsModel.rowCount() > 0 visible: rc.available
text: i18n("Run command") 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 { Repeater {
id: commandsView id: commandsView
visible: rc.available visible: rc.available