Because a cached dialog stays parented to the initial part, which might
not be the one used to open it.
This is especially visible now that we support more than one window per
okular process.
For example:
- User initially opens a dialog from window A
-> This dialog gets cached as child of A's PageView. This implies that
clicking on the dialog also brings window A to foreground.
- User re-opens the dialog from a different window B
-> The dialog is still a child of A's PageView, therefore clicking on the
dialog's frame brings A to the foreground, and B to the background.
Instead of listening on KConfigDialog's signals, this patch makes parts
listen on Okular::Settings::self()'s configChanged() signal.
Unlike KConfigDialogs, Okular::Settings::self() is unique and never
changes during the process lifetime, and therefore:
- A part can connect during initialization and receive notifications,
without depeding on KConfigDialog objects (which might be instanced
or deleted by a different part).
- The connection now survives deletion of the KConfigDialog.
Just use the pointer as id :-)
This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future
Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
SlotDoFileDirty tries to reload the file at regular intervals.
This patch fixes it so that it can actually reopen the file even if
it is not ready at the first timer shot.
BUG: 310531
As a side effect, this change fixes bug 303998, that caused a crash if
the part's widget was destroyed before the part itself, because
m_findBar had already been destroyed.
BUG: 303998
FIXED-IN: 4.9.0
Instead of directly killing the search in the core, emit a signal
caught by FindBar to tell its SearchLineEdit to reset the search
operation.
In this way, SearchLineEdit can set m_changed, and next time a new
search operation will be started, instead of attempting to use the
old one.
The only affected generator is poppler (because it's the only one with
saving support).
Since version 0.20, Poppler can save annotations to PDF. If the user is
using an older version, this patch warns him that annotations are not
saved.
This patch turns Okular into a ReadWritePart. Annotation editing is always
disabled if we're loaded as ReadOnlyPart, no matter the document type.
REVIEW: 105020
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
It seems some shells (like konqueror and kile) are too smart and play with the focus and the focus ends up in the wrong place because they "overwrite" our setFocus call, now we workaoround that by using the queuedconnection
BUGS: 214020
BUGS: 240516
FIXED-IN: 4.8.0
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
Since we are going to use KStandardAction::saveAs again later for the "real" 'Save As...'.
This was working fine since there is no default shortcut for SaveAs but if the user sets one
in the global kde config then he gets duplicate shortcut problems
BUGS: 268551
This handles the case when the source location changes without a need for the
document to be scrolled.
Better call 'viewport()->update()' in 'Part::setShowSourceLocationsGraphically'.
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.