Issue #1333 removed Evince ability to run any command
from pdf 'launch action', while the security concerns
brought up in #1333 were valid, the measure implemented
was maybe too drastic, as there are valid use cases
where launching a pdf is needed.
For instance, the cases described in issue #48, one of
them is the document 'Nissan Patrol Maintenance Manual'
which is comprised of several pdf files, where there is
one acting as index for the others, this index pdf file
uses the launch action to open the other pdf's.
So this commit allows to launch a file from a link
action only when:
- that file is a pdf file.
- the launch action originates from click event,
to be sure the user requested the action.
Besides, we don't just let the system execute the
file, but because it's a pdf we do it ourselves by
launching a new evince instance (or if that file was
already opened then presenting its window).
Fixes issue #48
EvView have signals 'annot-added', 'annot-removed', 'annot-changed'
which EvWindow connects to update the window widgets accordingly.
When cancelling an ongoing add-annotation operation through eg.
not highlighting any text when adding a markup annotation, we
don't have any corresponding signal to let EvWindow know of this
cancel (as 'annot-added' is only for when it's created
succesfully).
So we add a new EvView 'annot-cancel-add' signal which is
emitted for this case and that EvWindow can respond to it
by updating the ui accordingly i.e. unpressing button in
EvAnnotationsToolbar.
Fixes part of #1730
to avoid unwanted previews showing up in any of these
situations:
- when scrolling the view
- when pressing PageUp/PageDown or NextPage/PrevPage keys
- when changing to a page by clicking a bookmark or outline entry
we make sure to only show them when moving the mouse over them
(motion events).
Fixes issue #1666
Make EvPrintOperationExport an abstract base class, and move the
unix printing specific code to a new EvPrintOperationExportUnix.
This is in preparation to creating a EvPrintOperationExportPortal
which implements the export operation via Portal.
By right clicking an annotation and selecting "Annotation Properties...",
there exists an option called "Initial window state" which regulates
whether the annotation window should be opened when opening the document.
This behavior was altered by commit aed1af6fa7,
whose purpose was exactly to prevent annotation windows from opening
for performance reasons.
Fixes: https://gitlab.gnome.org/GNOME/evince/-/issues/1425
Fail the render job if the surface is in error state. This prevents
the failure of the render job leaking out to failing to render the
evince UI.
Based on a patch by Marek Kasik <mkasik@redhat.com>.
Use the newly added EV_PUBLIC macro to explicitly mark symbols to be
exported, instead of exporting everything starting with "ev_".
This removes lots of accidentally exposed, private functions. Since
those are not contained in public installed headers, this should be ok.
Only clear priv->links when it's not NULL. This fixes lots of warnings
when closing the previewer window on a document with links:
GLib-CRITICAL **: 23:46:34.810: g_hash_table_remove_all: assertion 'hash_table != NULL' failed
GLib-CRITICAL **: 23:46:34.810: g_hash_table_destroy: assertion 'hash_table != NULL' failed
Evince depends on GTK 3.22, hence we do not need those safeguards
for running on old GTK versions as they would fail anyway.
Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Commit 722b38a2bc introduce the automatic opening of new annotation window when a user highlight text.
While it is convenient for reviewing articles, it is not for users who only want to highlight text or annotate in some other way.
Property 'duration' of EvTransitionEffect was of
int type, so when passing a 0.5 value it would
cast to zero.
So let's add a new 'duration_real' property to hold
the duration in decimal format, and use it for the
effect's duration.
Fixes#637
The dual page setting doesn't make sense when the document contains
only one page. With this change, dual page setting is ignored for
displaying single page documents.
Closes#220
Bumping the major version to 40 in commit
288be740b5 inadvertently changed the
soname for shared libevdocument and libevview.
Fix this by making the soname calculation independent from the project
version as the library ABI hasn't actually changed.
I believe that passing unscaled offset coordinates to cairo_set_source_surface
during a process of drawing a page _effectively_ does the same transformation.
Also this fixes link preview popups when a link is on the currently viewed
page, because the solution introduced in commit caad329a did not account for
nonzero device offsets. Without this patch any preview of a link referring
to the current page would go completely black when the page is scrolled at
least popup's height pixels down.
When showing link preview popover we should take device_scale
into consideration.
Two cases must be handled:
1. If we get the page_surface from the ev_pixbuf_cache
(this typically happens if link is to same page or within +/- 10
pages)
2. If we render the page_surface by our own job
(this typically happins if link is more than 10 pages away)
Fixes#1543
The Reproducible Builds effort <https://reproducible-builds.org/>
noticed that evince could not be built reproducibly.
This is because it generates .h header files that contain the absolute
build path via the @filename@ placeholder.
Use @basename@ instead — these are comments, after all.
Bug-Debian: https://bugs.debian.org/970383
Add new type of action EV_LINK_ACTION_TYPE_RESET_FORM for EvLinkAction
together with properties "reset-fields" and "exclude-reset-fields".
The properties controls which fields are reset and are set in PDF document.
This commit extends EvDocumentFormsInterface with new method "reset_form".
Issue #46