plasma upgrade script

Harald Sitter apachelogger at
Sat Feb 20 19:25:58 GMT 2010

On Thursday 18 February 2010 12:00:40 Jonathan Riddell wrote:
> For upgrades I think we should move these plasma widgets from the
> panel into the systray.  I wrote a script to do so

I looked at this earlier and I think there is a beauty issue to it... the 
script should IMHO only move existing applets to the tray. Say the user 
removed (for whatever reason) the battery applet from his primary panel, then 
the update script should not re-add it embedded into the tray (the user could 
have removed it because he actually placed it on another panel, located at the 
top of the screen, or on another screen altogether).

So, I think if we decide to keep the script around, we should at least change 
the process a bit. I propose the following
a) move the actual adding to tray to an own function
b) enhance said function with removing a widget, so that the function in fact 
does *move* the widget from somewhere on the panel, into the systray
c) iterate over the widgets on the panel and set appropriate vars if systray 
and the to-be-moved-applets if found
d) if systray is found -> switch through all possible to-be-moved-applet-vars 
and call the move function if necessary

This way we should get cleaner code and only move stuff to the tray that is 
already there on the panel somewhere. Possibly we could also forget about 
making it a function and find some nifty way of getting out of this without too 
much hassle (function of course looks better, then again I have yet to read on 
about functions in ecmascript ;))

Another question that just occurred to me: what happens if the user already 
added an applet manually to the tray?

And another one: what if the user added an applet to the tray but it is still 
present independent from the tray? (on that part I would like to note that the 
indicator applet exhibits non-standard behavior in that it is not removable 
via simple right click, which is a bad thing altogether from my POV)

Harald Sitter
Kubuntu Core Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the kubuntu-devel mailing list