Make Appmenu work based on the presence of a visual representation
ClosedPublic

Authored by mart on Dec 5 2017, 8:39 PM.

Details

Summary

drop the internal settings InApp,Menu, Decoration
but instead export the menu based on the presence of a dbus service called
org.kde.appmenuview, exported by either the menubar applet or the
kwin decoration button

let the decoration button and the globalmenubar work at the same time

not necessary anymore to have the setting in the kcm

Test Plan

adding an appmenu applet causes apps started afterwards
to export their menubar, removing it causes new apps to
have their menubar internal again

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Dec 5 2017, 8:39 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 5 2017, 8:39 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Dec 5 2017, 8:39 PM
broulik added a subscriber: broulik.Dec 6 2017, 9:52 AM

+1 to the idea

+1 very good...

mvourlakos added inline comments.Dec 6 2017, 12:49 PM
appmenu/appmenu.cpp
208–209

is this ok? isnt that return blocks any code below?

mart added inline comments.Dec 7 2017, 8:18 AM
appmenu/appmenu.cpp
208–209

eww, right, a leftover.. it means that the whole content of the method should get droppped now as there is no such thing as reloading configuration.
the method stays as it's exposed to dbus for compatibility, butbasically a noop

mart updated this revision to Diff 23600.Dec 7 2017, 8:35 AM

remove dead code

ngraham added a subscriber: ngraham.Dec 9 2017, 1:46 PM
davidedmundson added inline comments.
applets/appmenu/lib/appmenuapplet.cpp
60

I don't understand what this else clause is about

appmenu/appmenu.cpp
206

typos

208–209

why?

mart updated this revision to Diff 23806.Dec 12 2017, 1:49 PM
mart marked an inline comment as done.
  • better comments
mart marked an inline comment as done.Dec 12 2017, 1:49 PM
mart added inline comments.
applets/appmenu/lib/appmenuapplet.cpp
60

it registers or unregisters the service when the destroyed value of the applet change, and not in the dtor, because:
when we "delete" an applet, it just hides it for about a minute setting its status to destroyed, in order to be able to do a clean undo: if we undo, there will be another destroyedchanged and destroyed will be false.
When this happens, if we are the only appmenu applet existing, the dbus interface will have to be registered again

appmenu/appmenu.cpp
208–209

leftover, can be killed

davidedmundson accepted this revision.Dec 12 2017, 1:52 PM
This revision is now accepted and ready to land.Dec 12 2017, 1:52 PM
This revision was automatically updated to reflect the committed changes.
abetts added a subscriber: abetts.Dec 12 2017, 3:03 PM

Is there a screenshot of this change?

Is there a screenshot of this change?

It's effectively non visual

Is there a screenshot of this change?

It's effectively non visual

Love it! ha!