[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-workspace] applets/digital-clock/package/contents: Make calendar pin persistent across sessi
From: David Edmundson <null () kde ! org>
Date: 2017-10-13 10:35:46
Message-ID: E1e2xJi-0001wy-Nf () code ! kde ! org
[Download RAW message or body]
Git commit 0ef9782b11bae3f62efe37be009fe09afef6de0d by David Edmundson.
Committed on 13/10/2017 at 10:35.
Pushed by davidedmundson into branch 'master'.
Make calendar pin persistent across sessions
Summary:
A user can "pin" the calendar so that it won't get closed on focus
change, but only when the clock is clicked again.
This persists across open/close operations, but currently doesn't
persist across Plasma restarts.
This patch loads the saved config value of the last pinned state.
Test Plan:
Opened calendar, set pin, closed it, reopened and it was still pinned
(which is the current state)
killed plasma, restarted plasma, was still pinned (new)
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8252
M +4 -0 applets/digital-clock/package/contents/config/main.xml
M +8 -1 applets/digital-clock/package/contents/ui/CalendarView.qml
https://commits.kde.org/plasma-workspace/0ef9782b11bae3f62efe37be009fe09afef6de0d
diff --git a/applets/digital-clock/package/contents/config/main.xml \
b/applets/digital-clock/package/contents/config/main.xml index 4d19fb5f..df89e0cc \
100644
--- a/applets/digital-clock/package/contents/config/main.xml
+++ b/applets/digital-clock/package/contents/config/main.xml
@@ -65,5 +65,9 @@
<label>A list of plugins where additional calendar event data can be \
sourced.</label> <default></default>
</entry>
+ <entry name="pin" type="Bool">
+ <label>Whether the popup should remain open when another window is \
activated</label> + <default>false</default>
+ </entry>
</group>
</kcfg>
diff --git a/applets/digital-clock/package/contents/ui/CalendarView.qml \
b/applets/digital-clock/package/contents/ui/CalendarView.qml index dd51acfa..533346da \
100644
--- a/applets/digital-clock/package/contents/ui/CalendarView.qml
+++ b/applets/digital-clock/package/contents/ui/CalendarView.qml
@@ -120,6 +120,12 @@ Item {
}
}
+ Binding {
+ target: plasmoid
+ property: "hideOnWindowDeactivate"
+ value: !plasmoid.configuration.pin
+ }
+
PlasmaComponents.Label {
id: dayLabel
anchors.left: parent.left
@@ -347,6 +353,7 @@ Item {
height: width
checkable: true
iconSource: "window-pin"
- onCheckedChanged: plasmoid.hideOnWindowDeactivate = !checked
+ checked: plasmoid.configuration.pin
+ onCheckedChanged: plasmoid.configuration.pin = checked
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic