Check if the clipboard is empty when initializing the status of the Clipboard applet

Summary:
In D29652, I made an annoying mistake: I removed the check if the clipboard is empty when initializing the **Plasmoid.status** of the Clipboard applet. If the user enables the option to save clipboard content, then after restarting the Plasma, even if the clipboard had content, the state of the applet will be **PlasmaCore.Types.PassiveStatus** and its icon will be hidden in the system tray. This patch fixes this issue. I hope it will get into Plasma 5.19.

See: https://phabricator.kde.org/D29652

Reviewers: ngraham, mart

Reviewed By: ngraham, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29818
wilder-portage-prov
Eugene Popov 6 years ago committed by Nate Graham
parent e8c7274496
commit d228a44a51
  1. 2
      applets/clipboard/contents/ui/clipboard.qml

@ -32,7 +32,7 @@ Item {
Plasmoid.switchWidth: units.gridUnit * 5
Plasmoid.switchHeight: units.gridUnit * 5
Plasmoid.status: PlasmaCore.Types.PassiveStatus
Plasmoid.status: isClipboardEmpty ? PlasmaCore.Types.PassiveStatus : PlasmaCore.Types.ActiveStatus
Plasmoid.toolTipMainText: i18n("Clipboard Contents")
Plasmoid.toolTipSubText: isClipboardEmpty ? i18n("Clipboard is empty") : clipboardSource.data["clipboard"]["current"]
Plasmoid.toolTipTextFormat: Text.PlainText

Loading…
Cancel
Save