Instead just set the right focus properties so that we are actually
declaring what we want instead of bypassing all the focus mechanisms.
This also uses Plasmoid.expanded to ensure we reevalute the focus
binding when the applet is reshown so it is in a known state.
The original condition will turn the text in the search field into an
unknown character. Move the logic to switch-case to fix the condition.
BUG: 448819
ListView will absorb the key events, so `Keys.onPressed` in
ClipboardPage will not receive the event. Instead we should connect
those key events to `arrowKeyPressed()`.
BUG: 448811
The behavior may cause unexpected results when the user spam press Del
in order to delete all characters in the search field, and find that
all items in the list are deleted.
It also causes pressing Del in the search field not deleting the fully
selected text.
BUG: 448738
BUG: 448739
Previously, clicking the Edit button opened a dialog to edit it in. Now
it is done inside the applet itself. This makes it much less disruptive
and jarring, and makes the editing action feel smoother.
- Up/Down now ensures item is completely in view
- Ctrl+F works
- Tab/Shift+Tab events are no longer eaten by the search field
- Tab/Shift+Tab now resolve to actions on the selected item first
- Can use Escape key to go back from from QR code page
Pressing the delete key will now delete the highlighted list item under
any of the following circumstances:
1. A list item is selected and has focus
2. A list item is selected and the search field has focus but it is
empty or the insertion point is at the end of the string (in either
case, pressing the delete key would otherwise do nothing)
This allows quickly and easily deleting clipboard items using only the
keyboard, including after using the search field to filter it down.
BUG: 439174
FIXED-IN: 5.78
Currently, the Clear History action remains visible even if the clipboard
history is empty. This patch changes this so the behavior of the Clear History
action will be the same as in the Notifications widget.
The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.
Here was my full process for making this change:
1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+ " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done`
This yields several benefits:
- The action automatically goes into the header in the system tray
representation, which improves the presentation
- We get a context menu action for it for free, which is a nice
accelerator for experts
the comboboix of a very rarely used feature right
in the header area is super noisy, looks misaligned and puts the feature
in a too much prominent role.
Put everything under a popup menu, mustually exclusive actions will be
shown as radiobuttons
Most of our other applets do this so their configuration window can be
reached without having to right-click anything, which is especially
important for touch. The Clipboard applet should too.
There's no point in keeping the search text if you're clearing all
entries, since doing that removes all data that the search field would
be searching through.
Otherwise if you search for some text and it produces no results, the
search field becomes disabled so you can't change or clear your search
and use the applet again!
This begins the process of porting plasma-workspace to PlasmaComponents3. At
this point, only the relatively easy work is done. Every file not ported
now has been given the reason for still using PC2 in a comment on the import
line so you can see at a glance what the blocker is by running
`grep -r "org.kde.plasma.components 2.0"` in the repo.
Everything is tested and there are no breakages or functional regressions. In
the process, a few unused imports are removed.
Here are the remaining PC3 omissions blocking what's left from getting easily
ported:
- No Highlight
- No ListItem
- No PageStack
- No ContextMenu
- No QueryDialog
- No ModelContextMenu
- TabBar has no left and right tab states
- ToolButton has no built-in method to show a menu when clicked
Which does the rendering and proper sizing for us, e.g. ensure integer scaling so the barcode remains scannable.
While at it, fix supportsBarcode (wasn't routed through to the delegate component when it was split out)
and add Code 128 which is in Prison now.
Also, show a label when the barcode would become too large to display (mostly for the 1D barcodes).
The Prison item does not use a thread for generating the barcode like the dataengine does but it's super fast.
Differential Revision: https://phabricator.kde.org/D29478
Summary:
The Clipboard and Notifications applets live in plasma-workspace; port them to use
Kirigami.PlaceholderMessage
Test Plan:
Clipboard: {F8253980}
Notifications: {F8253981}
Reviewers: #vdg, #plasma, broulik, niccolove, cblack
Reviewed By: #vdg, #plasma, niccolove, cblack
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T13021
Differential Revision: https://phabricator.kde.org/D29109
Summary:
Fixed clearing the clipboard when clearing history
(bug #409366 caused by 3bd6ac34ed)
Properly synchronize clipboard content and history
(deleting last item in history didn't clear the clipboard).
Keep last image in history even if we are ignoring images, but without preview
(so that we can still clear history, and the tooltip says truth about clipboard content).
Fixed tray icon tooltip text.
Do not scale small images up in clipboard Plasmoid.
BUG: 409366
{F7168503}
Test Plan:
Spectacle -> [Copy to Clipboard]
Paste into Dolphin (clipboard content)
Deleting single items from clipboard
Clearing the entire history
Reviewers: #plasma, #plasma_workspaces, ngraham, davidedmundson
Reviewed By: #plasma, #plasma_workspaces, ngraham, davidedmundson
Subscribers: GB_2, davidre, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22684
Summary: This patch adds the ellipsis (...) to the search field label in Clipboard so as to make it consistent with the labels in Kickoff, Kicker and KRunner.
Test Plan:
Before:
{F6521497}
After:
{F6521498}
Reviewers: ngraham, #plasma, #vdg
Reviewed By: ngraham, #vdg
Subscribers: abetts, filipf, plasma-devel
Tags: #plasma
Maniphest Tasks: T10258
Differential Revision: https://phabricator.kde.org/D17935
Summary: Use Breeze's new broom-style icon for the {nav Clear History} buttons in the Klipper and Notification plasmoids.
Test Plan:
With Frameworks 5.48, the broom-style icon will be shown:
{F6100570}
{F6103810}
With an earlier Frameworks version or a different icon theme, a backspace-style icon will be displayed:
{F6100573}
Reviewers: broulik, Fuchs, #plasma, davidedmundson
Reviewed By: Fuchs, #plasma, davidedmundson
Subscribers: Zren, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D14105
Test Plan:
Had text in text edit
pressed escape twice.
First pressed cleared, second closed as before (but from the external handling)
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3259
Adds a hint when the clipboard history is empty to be consistent with all the
other plasmoids, it's not pixel-perfect but good enough. Also improve alignment
of the search and highlight
BUG: 344159