[PATCH] drag to panel

Marco Martin notmart at gmail.com
Sat Jan 26 20:26:08 CET 2008


On Saturday 26 January 2008, Chani wrote:
> this makes it possible to drag applets from the desktop to the panel.
> it's a one-way operation, because panel applets don't have handles. I
> expect dragging from panel->desktop to be something we'll look at after the
> panel's configurable.
trying it right now, nice :) was trying to obtain the other way but it seems 
enabling the handles in the panel it's not possible to drag applets back to 
the desktop, seems like a mousereleasevent is lost somewhere :(

> I added another addApplet function in hte containment here; the existing
> addApplet that takes only one parameter isn't really suitable for being
> called by just anyone. do you think maybe it should be protected or
> private? or possibly merged with my new function...

like it because it looks like it could be used in the future also for 
rearranging items in the panel
is addapplet() used somewhere else? i'd say keep it and make it private
or if your function could work with a geometry parameter instead of a position 
(would make applet with wrong sizes in the panel?) it could become the only 
one and the one that creates the applet simply creates it and calls the new 
function

note on
//FIXME assuming everything else behaves like desktop
maybe it would make sense a virtual hasFreeLayout() or something like that in 
the containments implementations?

Cheers,
Marco Martin


More information about the Panel-devel mailing list