> On April 15, 2012, 5:06 p.m., C. Boemann wrote: > > libs/main/KoView.cpp, line 565 > > <http://git.reviewboard.kde.org/r/104607/diff/1/?file=56699#file56699line565> > > > > i think this todo should be fixed before pushing > > Friedrich W. H. Kossebau wrote: > I like the grouping of the similar unit types, ideally the page layout > dialog (and other places, are there?) would do that as well. > > Fix this by changing the enum ordering? Or have the unit selector in the > page layout dialog use the same order and translate to the enums? > > C. Boemann wrote: > I'd say fix the code in KoUnit so it reports the unit in the order you > like, and use KoUnit everywhere to define the order
You mean, KoUnit could have (additionally) static QVector<KoUnit::Unit> listOfUnitForUi(PixelVisibility visibility = HidePixel); static QStringList listOfUnitNameForUi(PixelVisibility visibility = HidePixel); int indexInListForUi(PixelVisibility visibility = HidePixel) const; ? So the enum could stay as it is for some future ABI, but any new type could be put in the sorting in the UI as useful? - Friedrich W. H. ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104607/#review12479 ----------------------------------------------------------- On April 15, 2012, 5:11 p.m., Friedrich W. H. Kossebau wrote: > > ----------------------------------------------------------- > 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 > ------- > > (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 > >
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel