[Okular-devel] Review Request: Merge request for 'viewerinterface' branch

Michel Ludwig michel.ludwig at gmail.com
Mon Oct 31 21:54:46 UTC 2011



> On Oct. 31, 2011, 4:25 p.m., Albert Astals Cid wrote:
> > ui/pageview.cpp, line 3283
> > <http://git.reviewboard.kde.org/r/102946/diff/2/?file=39720#file39720line3283>
> >
> >     When will zoom have less than 0 items?

Never, but d->items is a vector of pointers to PageViewItem, which will be empty whenever there are no pages ;)


> On Oct. 31, 2011, 4:25 p.m., Albert Astals Cid wrote:
> > part.cpp, line 2447
> > <http://git.reviewboard.kde.org/r/102946/diff/2/?file=39716#file39716line2447>
> >
> >     You sure we do not need this anymore? Doesn't seem much related to the general patch

This was done twice before, I think. Once in 'unsetDummyMode()' and once in the constructor. Now, it's only done in the constructor (line 494).


> On Oct. 31, 2011, 4:25 p.m., Albert Astals Cid wrote:
> > core/document.h, line 779
> > <http://git.reviewboard.kde.org/r/102946/diff/2/?file=39710#file39710line779>
> >
> >     We try to maintain source and binary compatibility in the okular core library. This is source compatible but unfortunately not binary compatible, do you really need to store the viewport type? This information does not really seem to belong to the viewport to me, a viewport is a given position into the view, how you got to create it should not be part of it in my opinion. Maybe you can store something like m_lastViewportChangeBecauseOfBlaBla in document and the use it on notifyviewport?

I thought about adding a flag to the document which indicates that the last viewport results from a source location. But that becomes a bit messy, I think, as one has to take care that other code paths which also manipulate the viewport clear that flag.

Hence, I came up with the idea to add a type to the viewport. I think it is justified as the source location viewports are somewhat special. :)

What do you think of not modifying the constructor but simply adding a new method like 'setFromSourceLocation(bool)' to the viewport class? That should be binary compatible.

Or maybe you have another suggestion?


- Michel


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


On Oct. 24, 2011, 8:35 p.m., Michel Ludwig wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102946/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2011, 8:35 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Description
> -------
> 
> The functionality that I need for Kile should now be implemented, i.e. handling of source references, disabling of certain actions and configuration options in 'ViewerWidgetMode', and drawing of source locations.
> 
> Note that currently the drawing of source locations doesn't work correctly for rotated pages. This is due to the fact that locating source references for rotated doesn't seem to be implemented in Okular yet. I'm thinking of disabling the rotate-page actions in 'ViewerWidgetMode' until this is implemented in Okular.
> 
> If you want to see the viewer mode in action, you can try it out by following the instructions given here:
> 
> http://sourceforge.net/apps/mediawiki/kile/index.php?title=Live_Preview
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt f8dcba0 
>   conf/dlggeneral.h 1ee2768 
>   conf/dlggeneral.cpp 80478e6 
>   conf/okular.kcfg b7d511c 
>   conf/preferencesdialog.h 72a7072 
>   conf/preferencesdialog.cpp 5ea6269 
>   core/document.h 2bcf280 
>   core/document.cpp a417828 
>   core/global.h 24cef77 
>   interfaces/viewerinterface.h PRE-CREATION 
>   part-viewermode.rc PRE-CREATION 
>   part.h f30eb6d 
>   part.cpp 9219db7 
>   ui/pagepainter.h 4044dd8 
>   ui/pagepainter.cpp 2bd2f23 
>   ui/pageview.h b89f346 
>   ui/pageview.cpp b119e82 
> 
> Diff: http://git.reviewboard.kde.org/r/102946/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michel Ludwig
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20111031/4521f43b/attachment.html>


More information about the Okular-devel mailing list