When signing a "filename versioned" pdf, e.g. foo-1.2.3.pdf, the
current suggestion for signed name is weird. the "_signed"
gets misplaced in the middle of the version.
Also, compressed pdf's (pdf.gz) gets up with weird suggestions.
Fix both of these cases and document (by tests) the current behavior.
Adobe Reader doesn't do it, and with reason, because otherwise we end up
with:
* Run focus in script
* script shows alert()
* form loses focus and gains it again once the alert() is closed
* infinite loop
The same fix we did in e457ceb731 but for
the rest of the widgets
BUGS: 472756
In certain usecases, especially for non-linux desktop builds, the
advantage of of dbus is often limited. Provide a way to disable
building with dbus.
Note that this also disables the related functionalities of having a
second okular launch open the document in the first okular.
This also disables the unit tests that tests those features.
When starting a pinch the user first touches with one finger. That causes the QScroller to enter the pressed state.
Then when the second finger touches and moves this causes the QScroller to interpret it as a scroll. This causes
the view position of the document to move
To avoid this send InputRelease to the scroller when a pinch starts to make sure it is no longer in pressed state.
Also don't send any input to the scroller while the pinch is ongoing to avoid it entering the pressed state again.
BUG: 421755
If the active backend is gnupg (e.g. if only compiled-in backend, or later when configurabitily thru okular has been merged), we can offer to view and edit certificates with Kleopatra (KDE's certificate manager)
This is an important feature of Okular, but when using the
KHamburgerMenu UX, it's quite buried in the More... section. Let's
move it up to the top level of the menu.
BUG: 470752
FIXED-IN: 23.08
If an open file with unsaved changes was deleted on disk, Okular
currently warns the user about it (in master) or prevents them from
saving it (in 23.04). But in both cases this is unnecessary; if the
open file was deleted on disk when the user tries to save changes,
Okular can simply save to its file path and re-create it, with no
risk of data loss or stomping on anyone else's work. So it should do
that.
CCBUG: 402017
Instead of just a simple list of "nickname"'s which is kind of like the
signing backend's internal ID for a given certificate, provide some more
context to each key.
This is a slight improvement, not a complete overhaul.
This is an abi break, but it menas we can extend signature and
certificate info in the future without breaking the abi again.
While we are at it, there is no need to hand around pointers to
certificate/signature info any longer, so clean up that. Fix memleaks as
side effect.
When the user tries to do a "Save" operation on an open file that was
since modified externally, currently Okular prohibits it. We can make
this a bit more user-friendly by instead explaining the situation
clearly and offering the user some options:
- Yes, really overwrite the changes made in the other program
- Instead save the unsaved changes as a new file elsewhere
- Abort
CCBUG: 402017
Currently Okular stops the user from saving their document if it has
unsaved changes and was modified externally. This makes some sense
because there are now two sources of truth, and Okular cannot reconcile
them itself. However as a consequence, it causes data loss since the
user's unsaved changes in Okular become un-save-able. This is quite
frustrating when it happens.
But this prohibiton on saving over an externally-modified document only
really makes sense for a "Save" operation that overwrites the original
document. If instead, the user does a "Save As...", then they can save
their local changes to another file and avoid losing unsaved changes.
Then if needed, they can manually compare the original
externally-modified document with their newly-saved document and
reconcile the changes by hand.
Accordingly, this commit avoids showing the error message box and
blocking saving if the user is doing a "Save As..." to a new location,
rather than overwriting the open file.
BUG: 402017
FIXED-IN: 23.04.1
Adds a "Copy Text to Clipboard" context menu which copies the
annotation text to the clipboard as plain text.
When an annotation is selected in "Browse" mode, its text is copied.
When using an LTR language, people scan user interfaces left-to right
and top to bottom. This means that the most frequently-used controls
should be located at the top left, so people see them first.
This commit uses that principle to re-arrange the toolbar a bit, so that
after the "show/hide sidebar button" (which needs to be the left-most
item to connect it with the left sidebar), the left-most items in the
default toolbar are the zoom and view mode controls. These are
viewing-related controls, and Okular is first and foremost a viewer app.
The controls that let you interact with the document (select stuff,
annotate) are moved over to the right side of the toolbar because they
are used for secondary workflows.
The zoom buttons are also grouped together to connect them in the user's
mind.
Finally, the separator lines are re-added to disconnect the "show/hide
sidebar" button from the now-icons-only zoom buttons.
This is a useful UI element that I find myself using a lot, so quick
access is helpful. Another person just submitted a similar change (see
!689) so it would seem there is some demand for this.
In its current form, the toolbar contents would be too long if we added
it, and items would get pushed into the overflow menu. To prevent this,
let's also drop the separator lines and text from the zoom buttons.