You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.1 KiB
63 lines
2.1 KiB
From 3fbc9aad103d684efb0cb7b86fdc2965c4746adc Mon Sep 17 00:00:00 2001
|
|
From: Marco Martin <notmart@gmail.com>
|
|
Date: Wed, 5 Oct 2016 09:56:39 +0200
|
|
Subject: [PATCH 06/19] always connect to "Local" source
|
|
|
|
Summary:
|
|
We need Local to be *always* present, even if not disaplayed as
|
|
it's used for formatting in ToolTip.dateTimeChanged()
|
|
this makes sure local is always in the connected sources, even if
|
|
it's not explicitly shown to the user
|
|
|
|
Test Plan:
|
|
tested, local timezone is not shown in clock/tooltip when
|
|
selected, and no warnings from dateTimeChanged()
|
|
|
|
Reviewers: #plasma, davidedmundson
|
|
|
|
Reviewed By: #plasma, davidedmundson
|
|
|
|
Subscribers: plasma-devel
|
|
|
|
Tags: #plasma
|
|
|
|
Differential Revision: https://phabricator.kde.org/D2936
|
|
---
|
|
applets/digital-clock/package/contents/ui/main.qml | 17 ++++++++++++++++-
|
|
1 file changed, 16 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/applets/digital-clock/package/contents/ui/main.qml b/applets/digital-clock/package/contents/ui/main.qml
|
|
index ca22e05..f117ea4 100644
|
|
--- a/applets/digital-clock/package/contents/ui/main.qml
|
|
+++ b/applets/digital-clock/package/contents/ui/main.qml
|
|
@@ -56,10 +56,25 @@ Item {
|
|
source: "Tooltip.qml"
|
|
}
|
|
|
|
+ //We need Local to be *always* present, even if not disaplayed as
|
|
+ //it's used for formatting in ToolTip.dateTimeChanged()
|
|
+ property var allTimezones
|
|
+ Connections {
|
|
+ target: plasmoid.configuration
|
|
+ onSelectedTimeZonesChanged: {
|
|
+ var tz = Array()
|
|
+ if (plasmoid.configuration.selectedTimeZones.indexOf("Local") === -1) {
|
|
+ tz.push("Local");
|
|
+ }
|
|
+ root.allTimezones = tz.concat(plasmoid.configuration.selectedTimeZones);
|
|
+
|
|
+ }
|
|
+ }
|
|
+
|
|
PlasmaCore.DataSource {
|
|
id: dataSource
|
|
engine: "time"
|
|
- connectedSources: plasmoid.configuration.selectedTimeZones
|
|
+ connectedSources: allTimezones
|
|
interval: plasmoid.configuration.showSeconds ? 1000 : 60000
|
|
intervalAlignment: plasmoid.configuration.showSeconds ? PlasmaCore.Types.NoAlignment : PlasmaCore.Types.AlignToMinute
|
|
}
|
|
--
|
|
2.7.4
|
|
|