[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:28:18 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=5d8cf95
The following commit has been merged in the master branch:
commit 5d8cf9544c0df2352a43f9ee487cedcb4c45a785
Author: Aleix Pol <aleixpol at kde.org>
Date: Fri Mar 13 00:56:25 2015 +0100
Fix how the plasmoid status is specified
No need to show the FullRepresentation to figure out the status of the
plasmoid.
Moves the code back to the main.qml file so that we're always tracking if
there's actually paired devices.
REVIEW: 122912
---
plasmoid/package/contents/ui/FullRepresentation.qml | 18 +-----------------
plasmoid/package/contents/ui/main.qml | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/plasmoid/package/contents/ui/FullRepresentation.qml b/plasmoid/package/contents/ui/FullRepresentation.qml
index 98e2e03..99f25ed 100644
--- a/plasmoid/package/contents/ui/FullRepresentation.qml
+++ b/plasmoid/package/contents/ui/FullRepresentation.qml
@@ -26,6 +26,7 @@ import org.kde.kdeconnect 1.0 as KdeConnect
Item {
id: kdeconnect
+ property alias devicesModel: devicesView.model
PlasmaExtras.Heading {
width: parent.width
@@ -44,15 +45,6 @@ Item {
}
*/
- function shouldPlasmoidBeShown()
- {
- if (devicesView.count > 0) {
- plasmoid.status = PlasmaCore.Types.ActiveStatus;
- } else {
- plasmoid.status = PlasmaCore.Types.PassiveStatus;
- }
- }
-
PlasmaExtras.ScrollArea {
id: dialogItem
anchors.fill: parent
@@ -60,15 +52,7 @@ Item {
ListView {
id: devicesView
anchors.fill: parent
- model: KdeConnect.DevicesModel {
- id: connectDeviceModel
- displayFilter: KdeConnect.DevicesModel.StatusPaired | KdeConnect.DevicesModel.StatusReachable
-
- }
delegate: DeviceDelegate { }
- onCountChanged: shouldPlasmoidBeShown()
- Component.onCompleted: shouldPlasmoidBeShown();
}
}
-
}
diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml
index 71e66b1..3e3be27 100644
--- a/plasmoid/package/contents/ui/main.qml
+++ b/plasmoid/package/contents/ui/main.qml
@@ -32,8 +32,22 @@ Item
return (plasmoid.formFactor == PlasmaCore.Types.Vertical || plasmoid.formFactor == PlasmaCore.Types.Horizontal);
}
+ DevicesModel {
+ id: connectDeviceModel
+ displayFilter: DevicesModel.StatusPaired | DevicesModel.StatusReachable
+
+ }
+
+ Binding {
+ target: plasmoid
+ property: "status"
+ value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus
+ }
+
Plasmoid.compactRepresentation: CompactRepresentation {}
- Plasmoid.fullRepresentation: FullRepresentation {}
+ Plasmoid.fullRepresentation: FullRepresentation {
+ devicesModel: connectDeviceModel
+ }
Plasmoid.preferredRepresentation: isConstrained() ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list