From d228a44a51e83da4cec778b629b14be02e288cfe Mon Sep 17 00:00:00 2001 From: Eugene Popov Date: Tue, 19 May 2020 08:05:56 -0600 Subject: [PATCH] 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 --- applets/clipboard/contents/ui/clipboard.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/clipboard/contents/ui/clipboard.qml b/applets/clipboard/contents/ui/clipboard.qml index 9b9dd8e07..7265fc27f 100644 --- a/applets/clipboard/contents/ui/clipboard.qml +++ b/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