<table><tr><td style="">davidhurka created this revision.<br />davidhurka added a reviewer: Okular.<br />Herald added a project: Okular.<br />Herald added a subscriber: okular-devel.<br />davidhurka requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21755">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>...action for toolbar button is controllable from outside. (Theoretically, the button could trigger <em>anything</em> now.)</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Pluggable in other menus, thus called “Menu”.</li>
</ul>

<p>This will replace the (mostly similar) CheckableActionMenu from my other patch <a href="https://phabricator.kde.org/D21195" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D21195</a>, leading to more consistence.</p>

<p>TODO:</p>

<ul class="remarkup-list remarkup-list-with-checkmarks">
<li class="remarkup-list-item remarkup-unchecked-item"><input type="checkbox" disabled="disabled" /> Load correct selection tool from configuration at startup, <em>after</em> mouseModeMenu is created.</li>
<li class="remarkup-list-item remarkup-unchecked-item"><input type="checkbox" disabled="disabled" /> Fix crash at destruction</li>
<li class="remarkup-list-item remarkup-unchecked-item"><input type="checkbox" disabled="disabled" /> Better name than ToggleActionMenu? ToolAction was probably better.. :-/</li>
<li class="remarkup-list-item remarkup-unchecked-item"><input type="checkbox" disabled="disabled" /> License headers. (I’ve seen that mailing list thread, yes... :-/ )</li>
</ul></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Open Okular and look at toolbar button -> has correct tool selected. (Not working yet.)</li>
<li class="remarkup-list-item">Open a document.</li>
<li class="remarkup-list-item">Look at toolbar button menu -> Correct menu entries (like before, with ToolAction).</li>
<li class="remarkup-list-item">Select some selection tools through shortcuts and toolbar button -> behaves correctly.</li>
<li class="remarkup-list-item">Add ToggleActionMenu ("mouse_selecttool") to menubar (..../kxmlgui5/okular/part.rc) -> Submenu looks correctly, has no checkbox attached and so on...</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>BRANCH</strong><div><div>create-toggleactionmenu</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21755">https://phabricator.kde.org/D21755</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
ui/pageview.cpp<br />
ui/toggleactionmenu.cpp<br />
ui/toggleactionmenu.h<br />
ui/toolaction.cpp<br />
ui/toolaction.h</div></div></div><br /><div><strong>To: </strong>davidhurka, Okular<br /><strong>Cc: </strong>okular-devel, joaonetto, tfella, ngraham, darcyshen, aacid<br /></div>