Clipboard history item actions are added to the menu by
KlipperPopup::rebuild() or PopupProxy::tryInsertItem().
The actions are removed from the menu again at the start
of KlipperPopup::rebuild(), but were never deleted.
The current shortcuts could conceivably override app shortcuts, since
they don't use the Meta key. The following changes are made:
Automatic Action Popup Menu: Ctrl+Alt+X -> Meta+Ctrl+X
Manually Invoke Action on Current Clipboard: Ctrl+Alt+R -> Meta+Ctrl+R
These are safe to change in the code rather than adding a new one and
keeping the old ones around for compatibility's sake because
KGlobalAccel::setGlobalShortcut by default preserves old shortcuts
when they are changed, and we aren't overriding that behavior here. So
only new installs will get the new shortcuts and existing user installs
will be untouched.
Caused by the context menu and the associated widget being set to the
same object, leading to an access after destruction.
Application: Klipper (klipper), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
#8 QObject::disconnect (member=0x0, ...)
#9 KStatusNotifierItem::~KStatusNotifierItem () at knotifications/src/kstatusnotifieritem.cpp:71
#10 KlipperTray::~KlipperTray () at plasma-workspace/klipper/tray.h:13
So that the "Apply" and "Defaults" buttons work properly.
Mostly this involves just setting appropriate object names
for the GUI controls, with some special handling for the
radio button sets.
This is the remaining part of the Klipper configuration dialogue,
the "Actions Configuration" page. Now that the options have been
moved to the "Popup" page, this is a simple tree view with action
buttons. The explanations and help links have been moved to the
"Edit Action" page, because that is where they are most applicable.
The "Action Properties" dialogue uses a QFormLayout, and includes
explanation text for the "Automatic" check box and the regexp help link.
Instead of editing in place, the "Edit" button opens a further dialogue
to edit the current entry. This is more discoverable and should be easier
on small displays than editing in place, although a double click is still
accepted. This dialogue has explanation text for substitutions.
The icon for a command can be set explicitly, for those cases where the
automatic detection (from the first word of the command) does not work.
Confirmation is requested when deleting a command or an action.
GUI:
I18N:
We can only access the QWidget's QWindow after it's been shown,
otherwise it's nullptr.
*8 QObject::installEventFilter(QObject*) (this=0x0, obj=0x561e5d7c6420) at qtbase/src/corelib/kernel/qobject.cpp:2218
*9 0x00007efbc06170dd in Klipper::showPopupMenu(QMenu*) (this=0x561e5d7c6420, menu=0x561e5fbb7c90) at plasma-workspace/klipper/klipper.cpp:407
When Plasma does not have focus on Wayland, we can't avoid Qt creating a xdg_toplevel.
It will get a decoration by default by KWin. Setting the flag avoids this.
CCBUG:436249
On Wayland if Plasma had no focus when the shortcut was invoked
- the menu window is created as toplevel because it has no parent and
there is no current focusWindow
- the application can't know the currrent cursor position
We use a newly introduced request on plasma_surface to open under the cursor.
As it can only be called before mapping a buffer to a surface, the menu is hidden
before being shown again.
BUG:436249
FIXED-IN:5.25
With the check box options previously on the "Actions" page, plus the
"Advanced" button (renamed to "Excluded Windows" to better reflect its
function), a shadow of the enable option (as on the system tray
popup menu) and the popup time (originally on the "General" page).
This brings all of the popup menu configuration options together,
and allows more space for the list on the "Actions" page.
Consistent wording referring to the menu throughout.
Add a message to point the user towards the next page for
configuring the actions.
Add some explanation text to the "Exclusions" list dialogue to explain
its function.
Currently, every time adding a new item, `beginInsertRows` and
`endInsertRows` are called, which is not efficient. Use `beginResetModel`
and `endResetModel` before and after loading history items to avoid
frequently emitting inserted signals.
CCBUG: 450989
libklipper_common_SRCS are compiled into the libklipper_common_static
library and then linked for the Klipper application. The same sources
are also compiled again to build plasma_engine_clipboard via
plasma_engine_clipboard_SRCS. This results in almost double the
compile time and repeated diagnostic messages (if there are any).
Use the previously built static library for linking the data engine.
Combine the "Text selection only", "Ignore selection" and "Ignore images"
options into separate sets of radio buttons for text and images, to make
their functions explicit.
Remove the "Prevent empty clipboard" option (but leave it as a hidden
config file setting), it was difficult to explain and it is unclear if it
ever had a use case.
Convert the page to a QFormLayout, and add explanatory text to existing
controls where appropriate.
GUI:
I18N: