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


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/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 Konsole.</div>
<div>By Jekyll Wu.</div>







<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;">The cause of that bug is "show-menubar" is contained in both konsoleui.rc(used by MainWindow) and sessionui.rc(used by SessionController). In MainWindow::showShortcutsDialog(), the following code adds that 'show-menubar' action twice since it is contained in the 'actionCollection()' of both MainWindow and SessionController.

    foreach(KXMLGUIClient * client, guiFactory()->clients()) {
        dialog.addCollection(client->actionCollection());
    }

The patch removes "show-menubar" from sessionui.rc. Instead, it adds or removes that action into/from context menu dynamically depending upon whether the window currently has menubar or not. The result is the content menu contains that "Show Menubar" action only when the menubar is hidden.

I feel this is not an ideal solution. Is there some way to tell KShortcutsDialog: "If the same action is added twice, Just count it as one single action"? That would make the code easier . 

And I'm not sure appending the "Show Menubar" action is nice or ugly. Should a separator be added before it?
</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;">seems fine in stand-alone konsole and hosts of konsolepart.</pre>
  </td>
 </tr>
</table>



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


 <a href="http://bugs.kde.org/show_bug.cgi?id=214493">214493</a>


</div>


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

 <li>desktop/sessionui.rc <span style="color: grey">(0dd1b66)</span></li>

 <li>src/SessionController.h <span style="color: grey">(46714c0)</span></li>

 <li>src/SessionController.cpp <span style="color: grey">(f437d9b)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/104193/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://git.reviewboard.kde.org/r/104193/s/452/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/03/08/when-menubar-is-visible_400x100.png" style="border: 1px black solid;" alt="when menubar is visible" /></a>

 <a href="http://git.reviewboard.kde.org/r/104193/s/453/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/03/08/when-menubar-is-hidden_400x100.png" style="border: 1px black solid;" alt="when menubar is hidden" /></a>

</div>


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




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