serenity
serenity copied to clipboard
Clipboard: Add persistent storage for clipboard entries
A clipboard entry can be set as persistent to survive reboots. Persistence is configured globally thanks to a setting in the Settings/Keyboard menu.
Clipboard window can now be toggled by clicking on the icon in the status bar. If the window is already open but not in front, it will be focused. This way, one can easily access the clipboard entries.
An entry is defined as (non-)persistent by right clicking on it in the clipboard window and use "Toggle persistence" action. This action is available only if clipboard persistence is enabled globally.
If persistence is enabled globally, clipboard content will be loaded when the ClipboardHistory applet is started. If one change the global settings, the applet should be restarted to automatically load clipboard content.
Partially addresses #4051
Known limitations:
- If window is minimized, impossible to show it again without calling hide() beforehand
- Rightclick menu label does not change based on persistence status. Here is the expected behaviour eventually:
- "Set as persistent" when the current entry is not persistent
- "Unset as persistent" when the current entry is persistent
- Sorting does not work when clicking headers in the clipboard window
Hello!
One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.
Thanks for your thorough review :heart: I'm currently working of applying your suggestions.
On a side note:
What about placing the clipboard configuration in a new tab under Settings->Keyboard ?
It would scope configuration related to clipboard in a dedicated space instead of clobbering the existing one dedicated to keyboard specific configuration.
Or create a new entry in Settings altogether, but it seemed a bit overkill at the time (since a single option was available).
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
Hello again @alimpfard,
I still have a conversation pending in the current merge request. I did not want to resolve it since I'm not sure the new implementation is compliant with your expectations.
No urgency here, just noticed the PR is now stale and may still be relevant to merge.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!