Commit 0ef9782b authored by David Edmundson's avatar David Edmundson

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
parent e7fb5371
......@@ -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>
......@@ -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
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment