[SCM] kdeconnect packaging branch, master, updated. upstream/1.0.1-206-gf661872
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 18:27:01 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=bbf33f6
The following commit has been merged in the master branch:
commit bbf33f69a6486729a777c770b2df3cae91bf5a84
Author: Aleix Pol <aleixpol at kde.org>
Date: Sun Aug 21 17:55:13 2016 +0200
Use actions rather than visual elements
---
app/qml/main.qml | 47 +++++++++++++++++++++++++++++++----------------
1 file changed, 31 insertions(+), 16 deletions(-)
diff --git a/app/qml/main.qml b/app/qml/main.qml
index 010c05b..0919c6f 100644
--- a/app/qml/main.qml
+++ b/app/qml/main.qml
@@ -31,32 +31,34 @@ Kirigami.ApplicationWindow
width: 400
height: 500
+ Kirigami.Action {
+ id: findDevicesAction
+ text: i18n ("Find devices...")
+ iconName: "list-add"
+ onTriggered: {
+ root.pageStack.clear()
+ root.pageStack.push("qrc:/qml/FindDevicesPage.qml");
+ }
+ }
+
globalDrawer: Kirigami.GlobalDrawer {
+ id: drawer
title: i18n("KDE Connect")
titleIcon: "kdeconnect"
// bannerImageSource: "/home/apol/devel/kde5/share/wallpapers/Next/contents/images/1024x768.png"
- content: ListView {
- anchors.fill: parent
+ property var objects: [findDevicesAction]
+ Instantiator {
model: DevicesSortProxyModel {
sourceModel: DevicesModel { displayFilter: DevicesModel.Paired }
}
- header: Kirigami.BasicListItem {
- label: i18n ("Find devices...")
- icon: "list-add"
- onClicked: {
- root.pageStack.clear()
- root.pageStack.push("qrc:/qml/FindDevicesPage.qml");
- }
- }
-
- delegate: Kirigami.BasicListItem {
- width: ListView.view.width
- icon: iconName
- label: display + "
" + toolTip
+ delegate: Kirigami.Action {
+ iconName: model.iconName
+ text: display + "
" + toolTip
enabled: status & DevicesModel.Reachable
checked: root.pageStack.currentDevice == device
- onClicked: {
+ checkable: true
+ onTriggered: {
root.pageStack.clear()
root.pageStack.push(
"qrc:/qml/DevicePage.qml",
@@ -64,7 +66,20 @@ Kirigami.ApplicationWindow
);
}
}
+
+ onObjectAdded: {
+ drawer.objects.push(object)
+ drawer.objects = drawer.objects
+ }
+ onObjectRemoved: {
+ var idx = drawer.objects.indexOf(object);
+ if (idx>=0) {
+ var removed = drawer.objects.splice(idx, 1)
+ drawer.objects = drawer.objects
+ }
+ }
}
+ actions: objects
}
contextDrawer: Kirigami.ContextDrawer {
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list