Review Request: Fixed: update the changeUnitActions on a change of the document's unit property

Friedrich W. H. Kossebau kossebau at kde.org
Sun Apr 15 18:11:31 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104607/
-----------------------------------------------------------

(Updated April 15, 2012, 5:11 p.m.)


Review request for Calligra.


Description (updated)
-------

(Bah, initial long text was lost on posting, due to connection/server error... :( )

The context menu of the horizontal ruler does not update itself if the unit type of the document is changed e.g. from the page layout dialog.

This patch fixes it.  It adds a subclass of QActionGroup, UnitActionGroup, which connects to the "unit changed" signal of the document and updates the checked state of the actions accordingly. It also handles the triggering of the actions in a central place, instead of having each action object do it, should be more lightweight in the end.

Candidate for backport to 2.4?

For now I made it configurable which units are put in the UnitActionGroup. Should instead the constructor of UnitActionGroup simply always create actions for all these units? ATM there is no other user anyway, could there be one?
An issue, which should be cared for in a separate patch IMHO, is that the order here is different from the order of units e.g. in the unit selector in the page layout dialog. I find it confusing that they are not the same orders. Will write an email to the ML for that next :)


Diffs
-----

  libs/main/KoView.cpp 81dafd3 
  libs/main/KoView_p.h 9b3dff2 

Diff: http://git.reviewboard.kde.org/r/104607/diff/


Testing
-------


Thanks,

Friedrich W. H. Kossebau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120415/0f38eaaa/attachment.htm>


More information about the calligra-devel mailing list