[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-devel
Subject:    Re: Review Request: Show hidden dock widgets when activated by a
From:       "Daniel Faust" <hessijames () gmail ! com>
Date:       2010-10-08 12:51:02
Message-ID: 20101008125102.4692.22319 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
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=C3=BCbking 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 fo=
und 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 sele=
ct 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 hav=
e 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


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/100030/">http://git.reviewboard.kde.org/r/100030/</a>
  </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Amarok.</div>
<div>By Daniel Faust.</div>


<p style="color: grey;"><i>Updated 2010-10-08 12:51:02.130807</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Thomas Lübking wrote: &gt; Have a look at \
QMainWindow::tabifiedDockWidgets (hint, if the list is &gt; empty, your dock of \
interest is likely not tabified ;-) &gt; 
&gt; Also do not dig for the docks by the object name, that&#39;s mega wonky and
&gt; will break sooner or later. Instead either add 3 fuctions
&gt; (&quot;setPlaylistAsCurrentTab&quot; etc - &quot;showDock&quot; is quite \
generic) or add an &gt; enum and dispatch (map to the widget pointer) it in \
&quot;setAsCurrentTab( &gt; AmarokDockId )&quot; (or in worst doubt, dispatch a \
constant string there)

I had a look at QMainWindow::tabifiedDockWidgets but it doesn&#39;t seem to do what \
I&#39;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</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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&#39;t come up with a very clean solution. But \
please have a look at the code yourself and share your opinion.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I&#39;m running amarok with this patch for many weeks now without any \
problems.</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>src/MainWindow.h <span style="color: grey">(b86470e)</span></li>

 <li>src/MainWindow.cpp <span style="color: grey">(54c6751)</span></li>

 <li>src/amarokurls/ContextUrlRunner.cpp <span style="color: \
grey">(7416fbc)</span></li>

 <li>src/amarokurls/NavigationUrlRunner.cpp <span style="color: \
grey">(6bb6c0b)</span></li>

 <li>src/playlist/PlaylistViewUrlRunner.cpp <span style="color: \
grey">(749233e)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/100030/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>




  </div>
 </body>
</html>



_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic