<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://svn.reviewboard.kde.org/r/6267/">http://svn.reviewboard.kde.org/r/6267/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 4th, 2011, 5:30 p.m., <b>Kevin Ottens</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://svn.reviewboard.kde.org/r/6267/diff/2/?file=43428#file43428line638" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdelibs/kfile/kfileplacesview.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void KFilePlacesView::contextMenuEvent(QContextMenuEvent *event)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">638</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">menu</span><span class="p">.</span><span class="n">addActions</span><span class="p">(</span><span class="n">customContextMenuActions</span><span class="p">());</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Instead of introducing new API what about reusing QWidget::actions() here? Then on the dolphin side it's just a addActions() call away.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm of course fine with this approach too. As you said currently only Dolphin requires this and adding a dedicated API for this might be overkill... I've just committed the one-liner patch to trunk.</pre>
<br />




<p>- Peter</p>


<br />
<p>On January 3rd, 2011, 8:32 p.m., Peter Penz wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.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 kdelibs and Kevin Ottens.</div>
<div>By Peter Penz.</div>


<p style="color: grey;"><i>Updated 2011-01-03 20:32:14</i></p>




<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;">For KDE SC 4.7 Dolphin allows to lock/unlock the panels (= QDockWidgets) like in Amarok. Beside having a menu entry in the menu under "View" the dual-action "Lock Panels"/"Unlock Panels" is also provided as context menu entry for all panels.

All panels have this menu-entry already, but the places panel is implemented as KFilePlacesView which currently does not allow to add custom actions to the context menu.

The attached patch extends KFilePlacesView by this (see screenshot, where the action "Unlock Panels" has been added).</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;">Tested in Dolphin by adding the actions "Unlock Panels"/"Lock Panels".</pre>
  </td>
 </tr>
</table>




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

 <li>/trunk/KDE/kdelibs/kfile/kfileplacesview.h <span style="color: grey">(1211329)</span></li>

 <li>/trunk/KDE/kdelibs/kfile/kfileplacesview.cpp <span style="color: grey">(1211329)</span></li>

</ul>

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



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>

<div>

 <a href="http://svn.reviewboard.kde.org/r/6267/s/600/"><img src="http://svn.reviewboard.kde.org/media/uploaded/images/2011/01/03/places_400x100.png" style="border: 1px black solid;" alt="Context menu with custom action "Unlock Panels"" /></a>

</div>


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








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