D15580: [WIP] New annotation toolbar

Simone Gaiarin noreply at phabricator.kde.org
Fri Jul 5 06:35:27 BST 2019


simgunz marked 6 inline comments as done.
simgunz added a subscriber: cfeck.
simgunz added a comment.


  I have managed to re-enable the action Tools > Review to show/hide the annotation toolbar.
  
  This action needs to be defined in shell.cpp, because to use KToggleToolBarAnnotation we need to pass a reference of the KToolbar to its constructor, and the toolbar does not yet exists when we setup the actions in pageview.cpp (line 633).
  This action needs to be created for each new part (e.g. when multiple tabs are created). This seems to work properly.
  
  Another weird thing I have noticed is that KToggleToolBarAnnotation is only able to toggle the annotation toolbar if this is also defined in shell.rc, while it is unable to toggle it when defined only in part.rc (even tough I am able to retrieve the toolbar instance correctly from shell.cpp, e.g. using toolBars(), also when the toolbar is only defined in part.rc). For this reason I had to define an empty annotation toolbar in shell.rc with the same name as the one in part.rc so that the two are merged. Is this the expected behavior of KToggleToolBarAnnotation? ( I include @cfeck in this discussion given that we were discussing KToggleToolBarAnnotation functionalities)

REPOSITORY
  R223 Okular

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

To: simgunz, #okular
Cc: cfeck, aacid, anthonyfieroni, davidhurka, knambiar, ngraham, tobiasdeiminger, okular-devel, maguirre, fbampaloukas, joaonetto, tfella, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190705/07dc66b8/attachment-0001.html>


More information about the Okular-devel mailing list