Signals and slots for containment show and hide actions (mainly for panels)

Emdek emdeck at gmail.com
Mon Mar 30 21:56:11 CEST 2009


Hello

I have some suggestions about small additions to Plasma API.
I've created wish on BKO (#188404) but Aaron said that it should be discussed on mailing list.
Below is partially modified and improved description of wish content (Aaron's comment is also worth reading).


Currently when containment (mainly panel) becomes hidden or shown there is no
notification for applets on it. There could be emitted signals, for example
containmentShown and containmentHidden and maybe property with visibility
state.
This is not big problem to emit these signals and in some cases this
information could be useful, examples:
- applet manages top level widget (for example to make menu button that
partially obscures window - yes, I know, this is hack, but I know also that
one of Plasma developers suggested this) and it should be hidden when panel
is hidden and shown when shown;
- this could be used also for desktop containments, for example we use some
player plasmoid - it could stop playback (of course this could be optional,
and remember, this is only example of possible usage, this could be used for
different things) when we switch to another desktop (containment with player
becomes not visible for us - not hidden by windows but being hidden panel 
or currently not visible desktop activity).

Additionally there could be added slots (or signals emitted by applet, so only
specialized containments could get and handle these request) to show and hide
containment (panel), for example showContainment and hideContainment. Hiding 
slot could be used to achieve manual hiding (click on plasmoid that invokes this
slot, unhiding done like in autohide), second could be used to show panel when 
applet needs attention (activate is not the case, because if you invoke global 
shortcut it is also invoked, so for example if you have task manager with uses that
keyboard shortcut for something and you try to use the same showing mechanism
like in Tasks plasmoid then it will also do that thing when task needs
attention).

Yes, I know, that bloating of API is very bad thing (and I've read already some about that,
and yes, we don't want to have next kicker mess) but I think that these four things could be very 
useful for applet developers.

Best regards
Michal




More information about the Plasma-devel mailing list