diff --git a/papers-47.0-fast-navigation.patch b/papers-47.0-fast-navigation.patch new file mode 100644 index 0000000..ee85f40 --- /dev/null +++ b/papers-47.0-fast-navigation.patch @@ -0,0 +1,37 @@ +From ee88fa8e3488b64f930632cefbc5115cf3a406e0 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Fri, 31 Jan 2025 12:57:37 +0100 +Subject: [PATCH 2/2] shell: Extend fast navigation + +Enable navigation to the beginning of the document for "go-backwards" action +even if the page number is lower than 10. +Enable the same for "go-forward" action for the end of the document. +--- + shell/src/document_view/actions.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/shell/src/document_view/actions.rs b/shell/src/document_view/actions.rs +index a4036ab92..006b9f58f 100644 +--- a/shell/src/document_view/actions.rs ++++ b/shell/src/document_view/actions.rs +@@ -655,6 +655,8 @@ impl imp::PpsDocumentView { + + if current_page + 10 < n_pages { + obj.model.set_page(current_page + 10); ++ } else { ++ obj.model.set_page(n_pages - 1); + } + } + )) +@@ -668,6 +670,8 @@ impl imp::PpsDocumentView { + + if current_page - 10 >= 0 { + obj.model.set_page(current_page - 10); ++ } else { ++ obj.model.set_page(0); + } + } + )) +-- +2.48.1 + diff --git a/papers-47.0-go-backwards-action.patch b/papers-47.0-go-backwards-action.patch new file mode 100644 index 0000000..2241046 --- /dev/null +++ b/papers-47.0-go-backwards-action.patch @@ -0,0 +1,26 @@ +From 7be0a67e000358476dda43edc74ea756d3066e18 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Fri, 31 Jan 2025 12:40:03 +0100 +Subject: [PATCH 1/2] shell: Fix "go-backwards" action + +The go-backwards action did not work before due to a typo in its name. +--- + shell/src/document_view/actions.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/shell/src/document_view/actions.rs b/shell/src/document_view/actions.rs +index bdf744431..a4036ab92 100644 +--- a/shell/src/document_view/actions.rs ++++ b/shell/src/document_view/actions.rs +@@ -659,7 +659,7 @@ impl imp::PpsDocumentView { + } + )) + .build(), +- gio::ActionEntryBuilder::new("go-back") ++ gio::ActionEntryBuilder::new("go-backwards") + .activate(glib::clone!( + #[weak(rename_to = obj)] + self, +-- +2.48.1 + diff --git a/papers.spec b/papers.spec index 0ace2b5..1b367ca 100644 --- a/papers.spec +++ b/papers.spec @@ -45,6 +45,10 @@ Patch: papers-47.0-snapshot-5de8d26c.patch # Patch to avoid crash when sidebar-page has unexpected value Patch: papers-47.0-check-sidebar-page.patch +# Fix fast navigation +Patch: papers-47.0-go-backwards-action.patch +Patch: papers-47.0-fast-navigation.patch + # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -77,6 +81,7 @@ BuildRequires: pkgconfig(poppler-glib) BuildRequires: pkgconfig(sysprof-capture-4) BuildRequires: /usr/bin/appstream-util BuildRequires: /usr/bin/desktop-file-validate +BuildRequires: pkgconfig(libspelling-1) %if 0%{?rhel} BuildRequires: rust-toolset @@ -162,7 +167,7 @@ cd ~- %meson \ -Ddjvu=%{?with_djvu:enabled}%{!?with_djvu:disabled} \ -Dintrospection=disabled \ - -Dspell_check=disabled \ + -Dspell_check=enabled \ -Dtests=false \ %{nil}