Ok, this is not really the review Jonathan did, i did rewrite the code partially because i did not really
want to have a new observer, but the code is heavily inspired in his patch.
Also the page number selector is not in the toolbar as the review had, it'd be silly to have it in both places
by default, so if you want to have it you have to go, edit the toolbar and add the "Page Number" action to it.
REVIEW: 103427
BUGS: 279128
FIXED-IN: 4.9.0
* We do not keep them around any more time than needed (they are cheap to create)
* AnnotWindow::slotsaveWindowText calls m_document->modifyPageAnnotation so
edition of inline notes happens immediately
Should never happen, but as it is the "main" widget of the part it might end up there if someone just says part->mainwidget->setfocus or something like that
At least this way the focus does not go down the drain and ends up in the sidebar list, which is not optimal but is better than getting the keyboard focus lost
I did not have time to finish the poppler work and even if this will probably be good for using the poppler work, this adds new API and I don't want to commit to this since having a proper look at making it work
Sorry i failed to fulfill my promise
Makes this statement similar to the one that uses pe->rect() instead of pe->region().rects()
You can test it by:
* Opening a document with okular
* Scroll down a bit so that you are not on the top of the viewing area
* Open the review tool
* Move the review tool around
* See how it leaves unrepainted garbage
* See how this patch fixes it
(cherry picked from commit 9f654a0029)
The method 'showSourceLocation' has been extended with a new parameter which
controls whether the given source location is shown graphically. A new method
'clearLastShownSourceLocation' has been added; and a corresponding implementation
is provided.
This increases the UI responsiveness on opening PDF that are slow to render
This is because we can only have one thread using the pdf because of
poppler, if we do not queue this call, it will immediately try to generate
the pixmap for this page ending up in the thread for rendering being started.
But then while we are still opening the file we will ask if the file
has embedded files, and this means accessing poppler again and we will be
stuck there because the rendering thread has still not finished. This way by
delaying the execution until we return to the event loop we guarantee
all short queries that are done while opening the file are done already and
we won't block the UI
In viewer mode the part will now use a different XML GUI file (part-viewermode.rc).
Also, some actions won't be created, e.g. those used for exporting stuff, for
launching presentation mode, or for selecting parts of the document. The captions
of the configuration dialogs also contain the word 'viewer' then.