Bug 469143 - Panel+Panel widget context menus show unintended items
Summary: Panel+Panel widget context menus show unintended items
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-04-29 14:35 UTC by Nate Graham
Modified: 2023-06-08 15:22 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Extra items (283.82 KB, image/jpeg)
2023-04-29 14:35 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-04-29 14:35:22 UTC
STEPS TO REPRODUCE
1. Log into a Plasma 6 session (built from source from the commits immediately before the layer-shell porting)
2. Right-click on a Panel widget or an empty area of the Panel

OBSERVED RESULT
Context menus shows actions not present in the Plasma 5 context menu:
- Remove [widget]
- Remove Panel
- Lock Widgets

These items were intentionally hidden in Plasma 5 to make the context menu not be so dangerous and to guide users to Edit Mode to make such adjustments

EXPECTED RESULT
Panel +Panel widget context menu looks the same as it did in Plasma 5

SOFTWARE/OS VERSIONS
Qt 6.4.3
Comment 1 Nate Graham 2023-04-29 14:35:41 UTC
Created attachment 158539 [details]
Extra items
Comment 2 Nicolas Fella 2023-04-29 18:11:34 UTC
Marco, looks like side effects from your plasma-framework refactoring?
Comment 3 Nicolas Fella 2023-04-29 19:20:06 UTC
Relevant line: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/containmentactions/contextmenu/menu.cpp#L149

The difference is in Applet::contextualActions()

in 5 this is empty, in 6 it has some actions
Comment 4 Marco Martin 2023-06-08 15:22:04 UTC
Git commit 72be4ac4189dbed0dadadc513800957db40068a8 by Marco Martin.
Committed on 08/06/2023 at 15:21.
Pushed by mart into branch 'master'.

Major api refactor

See https://invent.kde.org/frameworks/plasma-framework/-/issues/15 for details.

- Make plasmoid a pointer to Applet
- AppletInterface and ContainmentInterface become the mandated root item for plasmoids
- The Applet api is exposed now directly, both as plasmiod and Plasmoid.
- full/compactrepresentation is a direct property of PlasmoidItem defined as plasmoid root item

This is a first part of more things to come, as explained in the code TODOs, most notably still missing are:

* new context action api
* revise what is a Q_SLOT and what isn't
* where the screen geometry api goes
* killing packageurlinterceptor
* killing colorContext

M  +4    -3    examples/applets/compactrepresentation/contents/ui/main.qml
M  +4    -1    src/declarativeimports/core/colorscope.cpp
M  +5    -2    src/declarativeimports/core/tooltip.cpp
M  +3    -0    src/plasma/CMakeLists.txt
M  +116  -4    src/plasma/applet.cpp
M  +92   -5    src/plasma/applet.h
M  +100  -5    src/plasma/containment.cpp
M  +146  -7    src/plasma/containment.h
M  +5    -0    src/plasma/corona.cpp
M  +8    -2    src/plasma/corona.h
M  +5    -1    src/plasma/private/applet_p.cpp
M  +6    -2    src/plasma/private/applet_p.h
M  +8    -2    src/plasma/private/containment_p.cpp
M  +7    -1    src/plasma/private/containment_p.h
M  +2    -0    src/plasmaquick/CMakeLists.txt
A  +53   -0    src/plasmaquick/appletcontext.cpp     [License: LGPL(v2.0+)]
A  +36   -0    src/plasmaquick/appletcontext_p.h     [License: LGPL(v2.0+)]
M  +204  -217  src/plasmaquick/appletquickitem.cpp
M  +36   -15   src/plasmaquick/appletquickitem.h
M  +58   -19   src/plasmaquick/configview.cpp
M  +7    -1    src/plasmaquick/configview.h
M  +2    -2    src/plasmaquick/dialog.cpp
M  +1    -0    src/plasmaquick/packageurlinterceptor.h
M  +52   -446  src/plasmaquick/plasmoid/appletinterface.cpp
M  +8    -339  src/plasmaquick/plasmoid/appletinterface.h
M  +69   -208  src/plasmaquick/plasmoid/containmentinterface.cpp
M  +23   -95   src/plasmaquick/plasmoid/containmentinterface.h
M  +8    -4    src/plasmaquick/private/appletquickitem_p.h
A  +70   -0    src/plasmaquick/private/plasmoidattached_p.cpp     [License: LGPL(v2.0+)]
A  +76   -0    src/plasmaquick/private/plasmoidattached_p.h     [License: LGPL(v2.0+)]
M  +26   -63   src/plasmaquick/sharedqmlengine.cpp
M  +6    -1    src/plasmaquick/sharedqmlengine.h

https://invent.kde.org/frameworks/plasma-framework/-/commit/72be4ac4189dbed0dadadc513800957db40068a8