Add edit mode menu item to desktop widget context menu

Authored by GB_2 on Dec 16 2019, 3:21 PM.


  • much improves discoverability of the ability to move added widgets without clicking and holding (I have seen people having trouble figuring it out)
  • makes it more consistent with panel widget context menus
  • allows easier access to the edit mode when the desktop is full of widgets
Test Plan

Open the context menu of a widget on the desktop.

Diff Detail

R242 Plasma Framework (Library)
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
GB_2 created this revision.Dec 16 2019, 3:21 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 16 2019, 3:21 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
GB_2 requested review of this revision.Dec 16 2019, 3:21 PM
GB_2 edited the summary of this revision. (Show Details)Dec 16 2019, 3:22 PM
GB_2 added a reviewer: mart.Dec 16 2019, 3:42 PM
GB_2 added a subscriber: mart.
GB_2 updated this revision to Diff 71674.Dec 16 2019, 3:44 PM

Decrease line count

GB_2 updated this revision to Diff 71675.Dec 16 2019, 3:44 PM

Remove space

broulik added inline comments.

Please check m_containment->immutability() so we don't add this if widgets are locked

GB_2 added inline comments.Dec 17 2019, 4:54 PM

Are you sure? It is already automatically disabled when immutability is UserImmutable and completely hidden if SystemImmutable, as it should be (same as for the desktop).

+1, makes sense

ngraham accepted this revision.Dec 28 2019, 4:31 PM
This revision is now accepted and ready to land.Dec 28 2019, 4:31 PM
davidedmundson accepted this revision.Jan 10 2020, 11:53 AM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.

I would prefer to see:

auto action = m_containment->corona()->actions()->action(QStringLiteral("edit mode"));
if (action) {

As otherwise we're relying on things which aren't specific public API. It's the sort of thing that can easily change in an updated library release and then our old software starts crashing.

GB_2 updated this revision to Diff 73195.Jan 10 2020, 1:39 PM
GB_2 marked an inline comment as done.

Use David's suggestion

This revision was automatically updated to reflect the committed changes.