D21755: This replaces the good working ToolAction by a (not so good working) ToggleActionMenu.Unlike ToolAction, ToggleActionMenu inherits from KActionMenu, and is more universally applicaple.* Menu can be set from outside, not hard coded.* Default...

David Hurka noreply at phabricator.kde.org
Tue Jun 11 22:27:10 BST 2019


davidhurka created this revision.
davidhurka added a reviewer: Okular.
Herald added a project: Okular.
Herald added a subscriber: okular-devel.
davidhurka requested review of this revision.

REVISION SUMMARY
  ...action for toolbar button is controllable from outside. (Theoretically, the button could trigger //anything// now.)
  
  - Pluggable in other menus, thus called “Menu”.
  
  This will replace the (mostly similar) CheckableActionMenu from my other patch D21195 <https://phabricator.kde.org/D21195>, leading to more consistence.
  
  TODO:
  
  [ ] Load correct selection tool from configuration at startup, //after// mouseModeMenu is created.
  [ ] Fix crash at destruction
  [ ] Better name than ToggleActionMenu? ToolAction was probably better.. :-/
  [ ] License headers. (I’ve seen that mailing list thread, yes... :-/ )

TEST PLAN
  - Open Okular and look at toolbar button -> has correct tool selected. (Not working yet.)
  - Open a document.
  - Look at toolbar button menu -> Correct menu entries (like before, with ToolAction).
  - Select some selection tools through shortcuts and toolbar button -> behaves correctly.
  - Add ToggleActionMenu ("mouse_selecttool") to menubar (..../kxmlgui5/okular/part.rc) -> Submenu looks correctly, has no checkbox attached and so on...

REPOSITORY
  R223 Okular

BRANCH
  create-toggleactionmenu

REVISION DETAIL
  https://phabricator.kde.org/D21755

AFFECTED FILES
  CMakeLists.txt
  ui/pageview.cpp
  ui/toggleactionmenu.cpp
  ui/toggleactionmenu.h
  ui/toolaction.cpp
  ui/toolaction.h

To: davidhurka, #okular
Cc: okular-devel, joaonetto, tfella, ngraham, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190611/6730e95f/attachment.html>


More information about the Okular-devel mailing list