Automatically close Clipboard applet after clearing history or deleting the last element
ClosedPublic

Authored by epopov on May 11 2020, 4:13 PM.

Details

Summary

It would be correct to close the Clipboard applet after clearing the history or deleting the last element, since there is nothing more to do with the empty Clipboard applet (similar to how the Notification applet closes after the last notification is removed).

BUG: 421345
FIXED-IN: 5.20

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
epopov created this revision.May 11 2020, 4:13 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 11 2020, 4:13 PM
epopov requested review of this revision.May 11 2020, 4:13 PM

I believe that there is a better solution, but I did not come up with it.

(similar to how the Notification applet closes after the last notification is removed).

But you're changing that in D29651?

ngraham edited reviewers, added: Plasma, broulik; removed: plasma-devel.May 11 2020, 5:45 PM
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptMay 11 2020, 5:45 PM
epopov added a comment.EditedMay 11 2020, 6:12 PM

Currently, the Notifications applet closes itself when the last element (notification) is removed (or if all elements are removed by pressing "Clear History" button in the top-right corner). But also it closes itself, even if the applet is pinned, and I guess that this behaviour isn't correct. D29651 fixes this issue.

Currently, the Clipboard applet remains visible when the last element (fragment) is removed (or if all elements are removed by clicking "Clear History" button in the top-right corner), even if the applet isn't pinned. This patch makes the Clipboard applet to close itself if there are no elements in the clipboard history and it's not pinned.

ngraham added inline comments.May 13 2020, 10:22 PM
applets/clipboard/contents/ui/clipboard.qml
33

For correctness, you should still set this value even if the binding is later broken in onIsClipboardEmptyChange , so the initial state isn't ambiguous.

epopov updated this revision to Diff 82816.May 14 2020, 7:17 AM

You're right. Fixed.

epopov marked an inline comment as done.May 14 2020, 7:17 AM
ngraham accepted this revision.May 14 2020, 3:01 PM
This revision is now accepted and ready to land.May 14 2020, 3:01 PM
ngraham edited the summary of this revision. (Show Details)May 14 2020, 3:04 PM
This revision was automatically updated to reflect the committed changes.