Annotations may come with a NULL color, use
a default color there instead of letting
undefined GdkRGBA to crash the application.
We take the chance to share this default color
to be the same we already use when creating
an annotation from Evince.
We also take the chance to replace deprecated
function ev_annotation_set_color() with
ev_annotation_set_rgba()
Fixes crash in #1800
which is available in Poppler since version 21.03.0
For that we create a new EvFindRectangle type to hold more match
information apart from coordinates, and use it all across Evince
including pdf backend (ev-poppler.cc) and djvu backend (djvu-document.c)
which are the only backends implementing the EvDocumentFindInterface.
To not break API compatibility, we added a new EvDocumentFindInterface
function which returns GList of this new EvFindRectangle type:
GList *(* find_text_extended) (EvDocumentFind *document_find,
EvPage *page,
const gchar *text,
EvFindOptions options);
and changed Evince to use this new function instead of find_text_with_options().
Some info about how this new search feature works:
- Ignores hyphen character while matching when:
1) it's the last character of the line.
2) its corresponding matching character in the search term
is not an hyphen too.
- Any whitespace characters in the search term will be allowed
to match on the logic position where the lines split (i.e. what
would normally be the newline character in a text file, but
PDF text does not include newline characters between lines).
- It won't match on text spanning more than two lines, i.e. it
only matches text spanning from end of one line to start of
next line.
Part of issue #333
When bundling evince library, the directory of the backends is copied in
another directory than the installation directory.
For example, cx_freeze is a popular Python package for creating
standalone executables from Python scripts. For applications using
Evince as a library, cx_freeze copies the evince dlls in the main
directory with the executable and the backends are copied to this
directory. So the directory is relative to the directory where the
executable is installed and not from the package installation
directory of evince (because it is not really installed).
Therefore, to help the use case where Evince is bundled as a library,
and not installes, we need a way to specify dynamically the path of this
new directory.
See MR !327 for more discussion.
Commit ed1e94af introduced an unintentional API and ABI break by
changing the creation_date and modified_date members of EvDocumentInfo
from GTime to GDateTime*.
Revert this API/ABI break by adding the created and modified GDateTime
members to EvDocumentInfoExtended, and add public getters and
backend-private setters.
Make the PDF backend set these, and adjust the properties view to use
the new accessor functions.
Fixes: https://gitlab.gnome.org/GNOME/evince/-/issues/1711
Add EV_PUBLIC define that uses the visibility attribute to make a symbol
public, and use this to mark exported symbols, instead of exporting
every symbol starting with "ev_", to make sure only symbols actually
intended to be public are exported.
Also add EV_PRIVATE define as an alias for EV_PUBLIC to mark symbols
that are nominally public because they are needed from libview/ or
shell/, but are not actually public API.
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
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.
and implement it for poppler backend. This field
tells the user if the pdf has any javascript in it.
This depends on the new poppler-glib api (0.90+):
gboolean poppler_document_has_javascript (PopplerDocument *document);
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
Add a new function to localize the time, and deprecate the old
one adding corresponding safeguards for GTime.
GTime is a 32bits in on some systems, and it is not safe year-2038 safe.
Signed-off-by: Germán Poo-Caamaño <gpoo@gnome.org>
Add deprecation guards, and annotate the function to mention
the version it has been deprecated, plus add to serve as a
visual cue for the deprecation guard
Use a new gdk-pixbuf feature to integrate application-provided
gdk-pixbuf loaders.
This makes it easy to include non-standard loaders without touching the
system installation.
See https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/34
To avoid the burden of maintaining multiple build systems, autotools
support has been removed.
GitLab CI configuration has also been updated to use meson.
when determining if the mouse pointer is over
a markup annotation (used by evince to change
the pointer type). This is more accurate than
just using the annot area.
Implemented as a new libdocument method interface
that we pass it the 'annotation' and 'x,y' coords
and returns us whether that location is over the
actual markup text of the annotation. The poppler
implementation works by checking if there's any
quadrilateral under that location.
For pdf, quadrilaterals represent a more precise
shape of the annotation than just the annotation
area (which is currently used) so by checking
the quads region we avoid false positives when
hovering over blank space.
The "point over a quadrilateral" code is based on:
Algorithm: https://math.stackexchange.com/a/190203
Implementation: https://stackoverflow.com/a/37865332
Fixes issue #1275
Most pdf readers implement a tooltip feature by
showing the string content of 'TU' field of a
widget annotation that is not linked to any
form field.
Normally, widget annotations carry a reference to a
form field which are used together to implement the
different form widgets. But, the PDF spec does not
forbid standalone (i.e. not linked to any form field)
widget annotations, and the fact is they're been used
by most pdf readers to show a tooltip when the area
of that AnnotWidget is hovered.
According to issue reported files, 'pdfTeX' seems to
be one of the pdf producers incorporating this tooltip
feature.
The support for this feature has been recently been
added to poppler-glib with following api:
gchar*
poppler_form_field_get_alternate_ui_name (PopplerFormField *field)
so this commit uses that api to show tooltips on pdf's
that carry them. For that we add a new 'alt_ui_name'
field to EvFormField and show it as a tooltip when
the field's area is hovered.
Evince issue #842
Poppler issue:
https://gitlab.freedesktop.org/poppler/poppler/issues/34
GTime is deprecated, but there's no point in generating deprecation
warnings for projects that include these header files (which won't
change). Warnings are still generated for the corresponding C code.