1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-07-04 16:48:55 +00:00
Commit Graph

9093 Commits

Author SHA1 Message Date
Pablo Correa Gómez
ce53e6f5cf ci: add check for code style respecting the repository .editorconfig
It currently runs with checks for indentation disabled. The main reason
is that the code contains innumerable situations where spaces are used
for indentation instead of tabs. Fixing those require extensive manual
and repetitive labour. And having this is probably better than nothing.

Additionally, the cut-n-paste is also ignored, since otherwise it wouldn't
be "cut and paste".
2023-06-20 15:27:24 +00:00
Pablo Correa Gómez
a41ba61be4 Fix files not addering to code style defined in editorconfig 2023-06-20 15:27:24 +00:00
Pablo Correa Gómez
14ffe0ae66 .editorconfig: allow trailing whitespaces in some non-code files
Since these files are either old, have a format that often introduces
spaces, or are not completely under evince's control (like translation
files).
2023-06-20 15:27:24 +00:00
Pablo Correa Gómez
607dab949e ev-application: remove loading and saving of custom accels file
This is an undocumented feature, since the ability to change shortcuts
was removed somewhere in GTK 3.10, according to the commit that
updated the documentation: 54f43719c6

The shortcuts documentation was later completely removed in
a050ee73d7 since the help-overlay in the
shell takes care of it.

Another reason to drop this is the lack of first-class support in
GTK4:

"There is no direct replacement for loading and saving accelerators
with GtkAccelMap. But since GtkShortcutController implements
GListModel and both GtkShortcutTrigger and GtkShortcutAction can be
serialized to strings, it is relatively easy to implement saving and
loading yourself."

So in GTK4 it's possible, but requires further development. Which is
likely of very little use for an undocumented feature introduced 15
years ago as a copy-paste in 83a7a11ba1

Relates !373
2023-06-19 02:35:57 +00:00
Pablo Correa Gómez
c6251bdead ev-application: do not migrate old config dir
The migration code has been there since tag 2.91.1. Remove it to
generally simplify the ev-application.c code. If anybody is migration
from GNOME pre 3.0 to GNOME 44, it is likely that the evince config
dir is the least of their problems.

This partially reverts 82415a8523
2023-06-19 02:35:57 +00:00
Pablo Correa Gómez
1dea736139 ev-annotations-toolbar: do not set unnecessary accessible
As pointed in
https://gitlab.gnome.org/GNOME/evince/-/merge_requests/373#note_1752292
it's not necessary, since the button takes care of that already.
2023-06-18 23:48:58 +00:00
Pablo Correa Gómez
899edd2651 ev-window: remove some unused macros 2023-06-18 23:19:25 +00:00
Pablo Correa Gómez
dbd3329478 meson: remove libxml2 dependency from PDF backend
There's nothing in the PDF backend making use of it. It is only used
in libdocument/ev-xmp.c, which is unconditionally added as part of
libdocument, so add the dependency as global instead
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
732fef00c5 previewer/meson: do not add extra dependencies for gnome.compile_resources
The files in the .gresource.xml are automatically added by meson as a
dependency.

Coauthored-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>

Helps !373
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
2f0bdeef0b shell/meson: do not add extra dependencies for gnome.compile_resources
The files in the .gresource.xml are automatically added by meson as a
dependency.

Coauthored-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>

Helps !373
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
6150af1a8a libview: make it possible to get libview icon directory from env var
Together with changes to meson, it allows to have icons while doing
"meson devenv". Icons are expected under the "hicolor" location, so
create a link that points there.
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
aa2e5276d5 meson: make it possible to run evince with "meson devenv"
This makes it possible to run changes in evince without actually
installing it, or without the system installation getting in the way
of the changes tested.
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
cce22ef207 Remove evince.convert for pre-gsettings conversion
This was introduced in 768a559d41, 13
years ago and pre GNOME 3 times. We can probably safely consider that
migration an existing installation from those times to current is
unsupported. Whoever tries to do that, is probably going to bump into
many other issues than some config not being migrated in evince.
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
71d116ba1d backend/djvu/meson: remove unused GNOMEICONDIR define 2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
fd4d577880 Remove evince.ico formerly used for windows resources
Introduced in 45467f0d8a and never
touched since, the icon is a way to embed the icon into the binary in
a windows-compliant way. At the time, there was code consuming the
ICON macro, like "cut-n-paste/smclient". That code does not exist
anymore and renders this file and the logic around it unnecessary.
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
782ffb33d8 meson: do not explicitly require adwaita-icon-theme
Evince is one of GNOME's core apps. All of them have an explicit
requirement on GNOME systems icon theme, which is currently
libadwaita. That's by design. Let's not clutter the build
infrastructure for something that should be known
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
b2a8869664 libmisc/meson: remove unused EVINCEDATADIR define 2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
9fef9087d6 data: remove hand-open.png and its installation
This was introduced in b36f3a1316 and
never again touched. This is not used at the moment anywhere in the codebase.
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
e11078b66f shell/meson: remove unused GNOMEDATADIR define 2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
35fd20cb4d meson: remove definition of G{TD}K_MULTIHEAD_SAFE macros
These do not really exist* in GTK3's code, and is probably some old
thing coming from GTK2 times. I went back as far as
31e16bd8f3 and still could not find
where were they introduced. Since they have no use, remove them.

* There is actually one #ifndef GDK_MULTIHEAD_SAFE in the
GtkIconFactory code, but that's only adding one function to the
API. And the GtkIconFactory code has to disappear from Evince. So that
should not be an issue.
2023-06-18 21:58:25 +00:00
Pablo Correa Gómez
c349853990 backend/meson: remove search for msgfmt
It's not directly used in evince's meson files, i18n.merge_file does
its own lookup
2023-06-18 21:58:25 +00:00
Germán Poo-Caamaño
c52a0f22a9 data: Fix years on 44.x releases 2023-06-18 14:57:42 -04:00
Nelson Benítez León
c50e5fb60e sidebar-links: fix Outline collapse status not being saved
in the particular case of a path being collapsed where it
had no descendants.

Closes #1936
2023-06-18 16:27:56 +00:00
Nelson Benítez León
015e9267e2 find-sidebar: don't discard matches without text area
It may happen that a text match has no corresponding text area available,
(due to limitations/bugs of Poppler's TextPage->getSelectionWords()
function used by poppler-glib poppler_page_get_text_layout_for_area()
function) so in that case, instead of discarding the match, we can
just show the matched text in the sidebar without surrounding text,
because the text area is only needed to retrieve surrounding text.

Closes #1943
2023-06-18 15:02:25 +00:00
Corey Berla
dc2abdec5b ci: Publish developer docs on gitlab pages
There's already a proper image setup and pages isn't currently utilized,
adding a pages job will publish the docs to be visible online.
2023-06-18 14:56:36 +00:00
Bastien Nocera
82cdd05736 build: Add support for validating appdata versions
This will avoid old dates from being mentioned in the appdata file, as
happened in evince.

This requires a version of appstream-util with the get-latest-version
command:
https://github.com/hughsie/appstream-glib/pull/468

See https://gitlab.gnome.org/GNOME/evince/-/issues/1950
2023-06-18 12:08:17 +02:00
Bastien Nocera
3af0b56c48 build: Check for NEWS and appdata updates for new releases
At least 4 different bugs were filed against the Flathub version of
evince because Flatpak prominently shows the appdata version in the UI,
making users think that there was a bug in the packaging, or that the
package had not been updated.

Avoid this problem in the future by failing the build if the NEWS or
appdata files aren't updated on release.
2023-06-16 10:37:31 +02:00
Jordi Mas i Hernandez
773e41eefa Update Catalan translation 2023-06-09 05:53:39 +00:00
Sabri Ünal
5da57686b9 Update Turkish translation 2023-05-26 23:05:40 +00:00
Pablo Correa Gómez
d68515c164 ev-page-accessible: silence maybe-uninitialized warnings
Silence the following warnings, since the compiler does not have the
warranty that start and end might have been set inside get_selection_bounds

../libview/ev-page-accessible.c: In function 'ev_page_accessible_get_selection':
../libview/ev-page-accessible.c:731:74: warning: 'start' may be used uninitialized [-Wmaybe-uninitialized]
  731 |                 if (get_selection_bounds (view, selection, &start, &end) && start != end) {
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
../libview/ev-page-accessible.c:726:22: note: 'start' was declared here
  726 |                 gint start, end;
      |                      ^~~~~
../libview/ev-page-accessible.c:731:74: warning: 'end' may be used uninitialized [-Wmaybe-uninitialized]
  731 |                 if (get_selection_bounds (view, selection, &start, &end) && start != end) {
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
../libview/ev-page-accessible.c:726:29: note: 'end' was declared here
  726 |                 gint start, end;
      |                             ^~~
}
}
2023-05-20 18:23:20 +00:00
Pablo Correa Gómez
609de7fe5c ev-sidebar-annotations: unconditionally create popup menu
The popup is now associated with a menu and can be created at init.
Creating the popup only on first use might save some very little memory,
but complicates the logic.
2023-05-20 18:03:32 +00:00
Pablo Correa Gómez
d2fe4c3cda ev-window: Simplify some logic in ev_window_open_uri
There is no need to re-check for "priv->metadata" when it just
got assigned. And if "priv->metadata" does not exist, neither does
"priv->bookmarks" that is cleared at the same time
2023-05-20 17:37:16 +00:00
Pablo Correa Gómez
19babb9114 Use G_SOURCE_CONTINUE and G_SOURCE_REMOVE when appropriate
Instead of directly TRUE and FALSE, to improve readability. These are
used in GSourceFunc functions, and represent no change in behavior!
2023-05-20 15:35:48 +00:00
Irénée THIRION
130b8fb7f3 Update French translation 2023-05-08 21:44:21 +00:00
Nelson Benítez León
10f4562e57 ev-view.c: fix crash when hovering links
Small oversight from the refactor in commit 33b251b6
which removed the "set to null" but forgot to
change the g_object_unref() for the g_clear_object()
call.

Bisected by Germán Poo-Caamaño.

Closes #1933
2023-04-29 14:56:20 -04:00
Fabio Tomat
6b53178956 Update Friulian translation 2023-04-28 07:50:02 +00:00
Nelson Benítez León
9ccdf1689b ev-window: fix restoring close button after fullscreen
This was probably an oversight after recent code refactorings.

Closes #1929
2023-04-26 23:44:33 -04:00
Nelson Benítez León
2ac5742594 ev-toolbar.c: fix crash when instantiating .ui template
Fix crash when instantiating 'evince-toolbar.ui' template
because Evince custom types used in that template were still
unregistered in GTK type system.

Register them with g_type_ensure() just before instantiating
the .ui template with gtk_widget_init_template()

Closes #1930
2023-04-25 20:40:05 -04:00
Sabri Ünal
af3de2e323 Update Turkish translation 2023-04-17 15:30:39 +00:00
Aleksandr Melman
187c6c0414 Update Russian translation 2023-04-14 22:42:39 +00:00
Alexander Shopov
3dac9991f0 Update Bulgarian translation
(cherry picked from commit 169966522e)
2023-04-07 17:41:57 +00:00
Yuri Chornoivan
eb5ba8e82b Update Ukrainian translation 2023-04-04 18:56:26 +00:00
Aleksandr Melman
472a6c12d6 Update Russian translation 2023-04-03 07:29:09 +00:00
Yuri Chornoivan
95a0a6591b Fix minor typo 2023-04-02 11:22:41 +00:00
Yuri Chornoivan
a249df8628 Update Ukrainian translation 2023-04-02 11:11:01 +00:00
Pablo Correa Gómez
73496af932
ev-view: Remove clear_link_selected private function
This function is a one-liner, that can instead be intuitively replaced
in the different places where it is used.
2023-03-24 09:58:49 +01:00
Pablo Correa Gómez
6702f26186
ev-view-presentation: Simplify reset_jobs calls
ev_presentation_delete_job already checks whether the job is NULL,
and finishes with a g_object_unref which warranties that

pview->*_job = NULL

So there's no need to set them afterwards.
2023-03-24 09:58:48 +01:00
Pablo Correa Gómez
200be9b923
properties: simplify freeing memory by better exploiting glib functions 2023-03-24 09:58:48 +01:00
Pablo Correa Gómez
b477c21c6d
previewer: simplify freeing memory by better exploiting glib functions
Mostly g_clear_object and g_clear_pointer. But also some small
simplifications depending on the context.
2023-03-24 09:58:48 +01:00
Pablo Correa Gómez
6257516218
libmisc: simplify freeing memory by better exploiting glib functions
Mostly g_clear_object and g_clear_pointer. But also some small
simplifications depending on the context.
2023-03-24 09:58:48 +01:00