[Patch] Allow toolbar to be completely detached as a window
Nikhil Marathe
nsm.nikhil at gmail.com
Sat Mar 20 16:31:56 UTC 2010
On Sat, Mar 20, 2010 at 8:05 PM, Thomas Lübking <thomas.luebking at web.de> wrote:
> Hi Nikhil,
>
> First of all, thanks for the patch but:
> It can /not/ be applied atm. and the way it is*, as the
> "topLevelChanged(bool)" signal is introduced with Qt 4.6, which is currently
> not a required base of Amarok :-(
> (if you don't read this list on a regular base - i ran into similar traps
> before ;-)
Thanks for the comments. Arch requires qt 4.6 for all KDE packages, so
I never really thought about that.
>
> About the patch itself:
> -----------------
> - i don't like too much that you need to close the toolbar to reparent it into
> the mainwindow :-\
Well once the toolbar becomes a window, I think significant code would
be required to detect
it floating over amarok's main window and so on. Maybe we can use some
trick like keeping the
toolbar active and when the window is moved, make the toolbar move.
But I don't have an idea
of how to do this right now.
>
> - the keep active thing is merely a windowflag, hinting to the WM (e.g. KWin)
> -> this should be achievable by telling the WM that "we wish to gain focus" or
> "deal focus ourself" (what would preserve the drag and drop reparenting
> feature :) even w/o changing the window type** (thus maybe confusing Qt's
> mainlayout code)
I'll take a look at this
>
> - mousetracking should not be required (you receive mousemoves anyway as long
> as a button is pressed), also why not just use the toplevelchange signal
> directly? (_iff_ we could use it ;-)
The topLevelChanged() signal is fired as soon as the bar is pulled
out. But the user
might want to put it at the bottom after pulling it out, in which case
we don't want
to respond to the event. So it's not possible. Besides calling addToolBar inside
topLevelChanged() crashes it, possibly because I'm interrupting some
crucial operation.
>
> - i also guess some ppl. oppose the title to be "Toolbar", should be more like
> "Amarok" ;-)
That can be done :)
Regards,
Nikhil
More information about the Amarok
mailing list