Review Request: Show hidden dock widgets when activated by a bookmark

Daniel Faust hessijames at gmail.com
Fri Oct 8 14:51:02 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100030/
-----------------------------------------------------------

(Updated 2010-10-08 12:51:02.130807)


Review request for Amarok.


Changes
-------

Thomas Lübking wrote:
> Have a look at QMainWindow::tabifiedDockWidgets (hint, if the list is
> empty, your dock of interest is likely not tabified ;-)
> 
> Also do not dig for the docks by the object name, that's mega wonky and
> will break sooner or later. Instead either add 3 fuctions
> ("setPlaylistAsCurrentTab" etc - "showDock" is quite generic) or add an
> enum and dispatch (map to the widget pointer) it in "setAsCurrentTab(
> AmarokDockId )" (or in worst doubt, dispatch a constant string there)

I had a look at QMainWindow::tabifiedDockWidgets but it doesn't seem to do what I'm looking for.
I need to identify a dock widget and then switch the tab. The only way I found to switch the tab is searching for the according QTabBar.
But QTabBar only holds the tab title and no information about the widget.
I improved it a bit by getting the title from the dock widget.

greetings, Daniel


Summary
-------

Since I have tabbed my Navigation and Context views I have to manually select the tabs every time I open a bookmark.
In my opinion this should be done automatically.
Unfortunately I couldn't come up with a very clean solution. But please have a look at the code yourself and share your opinion.


Diffs (updated)
-----

  src/MainWindow.h b86470e 
  src/MainWindow.cpp 54c6751 
  src/amarokurls/ContextUrlRunner.cpp 7416fbc 
  src/amarokurls/NavigationUrlRunner.cpp 6bb6c0b 
  src/playlist/PlaylistViewUrlRunner.cpp 749233e 

Diff: http://git.reviewboard.kde.org/r/100030/diff


Testing
-------

I'm running amarok with this patch for many weeks now without any problems.


Thanks,

Daniel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20101008/64a86b08/attachment.htm 


More information about the Amarok-devel mailing list