Smarter desktop applet placement

Ambroz Bizjak ambro at b4ever.net
Tue Aug 19 20:56:53 CEST 2008


Aaron J. Seigo wrote:
> what was the purpose of the change to Plasma::Applet::itemChange? it
> doesn't
> seem to harm anything, so it's now committed, but i'm wondering what it
> fixed
> (if anything?) for you.
My handler for the Applet::geometryChanged signal didn't see the applet's
new geometry(), but the old one.

> i've committed the changes to DefaultDesktop (do you have an svn account
> yet?)
> .. after some more testing, i think it would make sense to find a way to
> integrate this into libplasma so other containments can make use of it.
Yes I have a svn account (thanks!), but I was about to do more testing.
I've fixed two bugs since when I sent the last code (possible shutdown
crash from not disconnecting workAreaChanged, compatibility with configs
including only the "geometry" key), will commit them shortly.

However there is a weird problem with saving the state. Sometimes on
shutdown the state of applets will not be saved completely or at all. The
save functions are all called and my reimplemented saveContents seems to
do everything right, but plasma-appletsrc is not updated for some reason.
I've been looking into it, but haven't pinned down the problem yet. I
found out it can happen only if the containment has a layout attached, and
it doesn't even matter if any applets are added to the layout, or if the
default or my version of saveContents is used.
Though I've only been testing this on 4.1, will try trunk once plasma
doesn't crash on shutdown every time.

> patches against trunk are all that's needed; i don't think this is a valid
> candidate for backporting to 4.1.
Probably really not; but it's easier to test code if you have a working
baseline.

> the new folderviews were placed in the upper left corner, overlapping the
> first
> folderview. it probably makes sense in that case to place the new applet
> in
> the empty space below even if it "hangs off" the edge. it should probably
> only
> stack them in the corner if there is less than a certain % of the needed
> space
> for the applet required
I'll see what I can do. The current philosophy of my layout is that
everything should be inside the screen, it would complicate thinks a
little if there were exceptions.




More information about the Plasma-devel mailing list