summaryrefslogtreecommitdiff
path: root/libview
AgeCommit message (Collapse)AuthorFilesLines
13 daysepub: Implement search using WebKit find controllerHEADmasterVictor Kareh2-207/+31
Bypass the threaded EvJobFind for EPUB documents and use WebKit's WebKitFindController directly. The threaded find job was incompatible with GepubDoc's single-threaded design and caused segfaults. The new approach searches within the current page using WebKit's built-in text search and highlighting, which is both simpler and thread-safe. Assisted-by: OpenCode:claude-opus-4-6
13 daysepub: Store GepubDoc handle in EvWebView and simplify navigationVictor Kareh1-16/+13
Store a reference to the GepubDoc in EvWebView via the new get_doc_handle virtual method. Simplify next_page and previous_page to just update the document model, letting the page-changed callback handle content loading. This removes duplicate URI loading and prepares for reimplementing search with WebKit's find controller. Assisted-by: OpenCode:claude-opus-4-6
13 daysepub: Implement night mode using WebKit user stylesheetsVictor Kareh1-19/+24
Replace the old approach of modifying extracted HTML files on disk with a WebKitUserStyleSheet injected via the WebKitUserContentManager. This is cleaner and works with the new libgepub backend which no longer extracts files to a temporary directory. Assisted-by: OpenCode:claude-opus-4-6
13 daysepub: Replace backend internals with libgepubVictor Kareh1-0/+52
Replace the hand-rolled EPUB parsing with libgepub. This removes the bundled minizip library, custom XML utilities, and temporary directory extraction in favor of GepubDoc which handles archive access, metadata, spine navigation, and table of contents. An epub:// URI scheme handler serves resources directly from the archive without extracting to disk. Search and night mode are stubbed as no-ops pending follow-up commits. Assisted-by: OpenCode:claude-opus-4-6
13 daysepub: Add libgepub-0.7 build dependencyVictor Kareh1-0/+1
Add libgepub as a required dependency for the EPUB backend in both meson and autotools build systems. No source code changes yet, but this prepares for replacing the hand-rolled EPUB parsing with libgepub. Assisted-by: OpenCode:claude-opus-4-6
2026-06-25Add allow-links-change-zoom settingEduard Beutel3-24/+72
When enabled links are not allowed to change the current zoom mode and level. Fixes #712 Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/5d8ef0fa
2026-05-27Fix and off-by-one error for fit-to-page zoomUlrich Spörlein1-2/+31
In dual pane mode, with a mix of landscape and portrait pages, the wrong zoom level was getting applied to the wrong panes. For comic book spreads with the right side page being double-wide, this was ok. But when the left-page was double-wide, the extra zoom was applied to the *preceeding* dual pane view (making it extra small) and the actual wider pane got the standard zoom factor applied. Add debug logging showing the decision being made, which uncoveres the bug.
2026-04-10libview: Account for device scale in page cache size calculationVictor Kareh1-1/+4
On HiDPI displays, rendered pages use more memory than the cache budget expects because the size calculation does not account for the device scale factor. This causes the cache to use up to 4x more memory than configured on 2x HiDPI displays.
2026-04-10libview: Allow zooming to the limits of the scaleVictor Kareh1-6/+19
If the current zoom level was within one zoom factor of the limit, it was not possible to scroll towards the limit. This made smooth scrolling near the limit awkward, as unless the scroll event had a large delta it was impossible to reach the zoom limit. Non-smooth scrolling was also affected, but it was just much more difficult to trigger. Fix this by allowing zooming while the current zoom level is within one zoom factor of the limit. Add a new ev_view_can_zoom() function to make zooming by a factor (as with smooth scrolling) more convenient. Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/6d299b69
2026-04-10Use properties for can-zoom-in and -outVictor Kareh2-3/+79
This simplifies the logic required to enable zoom actions for consumers of the view. Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/bbfbf913
2026-02-13Improve search systemmbkma2-0/+11
shell: Add EvFindSidebar widget to show search results see https://gitlab.gnome.org/GNOME/evince/-/commit/940ce8048e4fc6503dca03c1ce090ff4a11dface eggfindbar: don't close the findbar when it loses the focus see https://gitlab.gnome.org/GNOME/evince/-/commit/a2d781fb124bd19861035fd41dacc976e00d19ef shell: Add the findbar to the main box instead of the view box libview: Add ev_view_find_set_result
2025-12-23meson: Clean up tests for EPubColomban Wendling1-1/+1
* Properly require WebKit for the EPub backend, instead of it being an optional dependency. * Merge EPub tests together to simplify things. * Make MathJax optional, as it always has been. If missing, MathML will likely not display properly, but it's probably not that big of a deal as it's not the only use case for the EPub backend. If not found at setup time, use the historical default as fallback, in case it gets installed later. Note that all this MathJax stuff is currently unused, because the code has not been adjusted to make use of this check's results.
2025-12-23meson: Replace backend boolean options with featuresColomban Wendling1-1/+1
This allows enabling the backend automatically depending on whether the dependencies are satisfied or not, like Autotool's counterpart. By default, the PDF backend is force-enabled and the Pixbuf backend is disabled, as with Autotools.
2025-11-05Fix meson pkg-config compatibility with configuresj1-1/+1
pkg-config input files set -latrilview etc. but the library outputs created were libview.so, so any project that used pkg-config was broken, not to mention that the file itself also got renamed from its previous value and pkg-config wouldn't find it anymore.
2025-05-15meson: Fix libview GIR namespace (#638)Colomban Wendling1-1/+1
2025-04-24epub: Disable thumbnailing sidebar.Michael Webster1-115/+7
A recent update to libwebkitgtk2gtk-4.1 breaks using WebKitWebView in a GtkOffscreenWindow. Disable the thumbnail sidebar with epub documents, and disable updating the GtkWindow thumbnail. ref: https://github.com/WebKit/WebKit/commit/8d7385fad3ffb31d0c438e6b6a50dffb4390840c Fixes: #631.
2025-04-04fix more build errorsOz Tiram1-1/+7
Signed-off-by: Oz Tiram <[email protected]>
2025-04-04chore: clean references to xreaderOz Tiram1-2/+2
Signed-off-by: Oz Tiram <[email protected]>
2025-04-04Initial support for mesonOz Tiram1-0/+116
Mostly copy and paste from linuxmint/xreader Signed-off-by: Oz Tiram <[email protected]>
2025-03-31libview/ev-document-model.c remove one more deprecation warningOz Tiram1-1/+1
Signed-off-by: Oz Tiram <[email protected]>
2022-02-11Fix implicit conversion changes signedness: 'gboolean' to 'guint'rbuj3-8/+8
2022-01-02Don't build the path to stock iconsrbuj2-15/+3
2021-11-20Use a blank line at mostrbuj11-24/+0
2021-04-13introspection: Fix bogus --library arguments.orbea1-1/+1
2021-01-28Remove warning -Wtype-limitsrbuj1-1/+1
2021-01-07Check whether the document page failed to renderrbuj2-1/+18
2020-08-23ev-pixbuf-cache: Remove -Wtype-limits warningsrbuj1-6/+6
2020-08-16Remove unused macrosPablo Barciela3-11/+0
2020-06-18Re-enable highlight_find_resultsOz N Tiram2-8/+3
2020-06-18Fix -Wunused-function warnings caused by --enable-synctex=noOz N Tiram2-1/+12
2020-06-18Make synctex optionalOz Tiram1-1/+8
Not everyone who reads PDF's is necessarily a LaTeX user. These changes allow users to install atril without the huge bagage of tex-live on systems where synctex isn't provided as a stand alone library.
2019-12-08libview: fixing memory leakGiselle Reis1-22/+21
The memory leak was caused by a g_signal_connect which was never disconnected. This patch makes sure the signal is disconnected and the job is cancelled before creating another rendering job. It additionally introduces a helper function to cleanly finalize the job. origin commit: https://gitlab.gnome.org/GNOME/evince/commit/939c434
2019-12-08Revert "First page should not reloaded"raveit652-6/+5
This reverts commit 00fad2c0d0fcdade570a08f046e85a4558f1fc0c. and fixes https://github.com/mate-desktop/atril/issues/404
2019-11-28avoid redundant redeclarationsPablo Barciela4-33/+0
2019-11-23libview: Reset `pressed_button` when starting Drag and DropMartin Wimpress1-0/+2
If view->pressed_button is left set, when the Drag and Drop operation completes, Atril will act as if it is still in a selection event. Adapted from: https://gitlab.gnome.org/GNOME/evince/commit/92828bb797742e04aadbfdd62ba1da36837c37cf
2019-08-21ev-view: Remove unused variables and assignmentrbuj1-3/+0
2019-08-19view-presentation: Use monitor instead of screenraveit651-4/+30
to determine window size. Replace {Width/Hight}OfScreen which works only with X11
2019-08-16ev-link-accessible: avoid 'g_type_class_add_private'Pablo Barciela1-3/+2
2019-08-16ev-timeline: avoid 'g_type_class_add_private'Pablo Barciela1-41/+38
2019-08-16ev-form-field-accessible: avoid 'g_type_class_add_private'Pablo Barciela1-3/+2
2019-08-16ev-image-accessible: avoid 'g_type_class_add_private'Pablo Barciela1-3/+2
2019-08-16ev-transition-animation: avoid 'g_type_class_add_private'Pablo Barciela1-40/+37
2019-08-16ev-page-accessible: avoid 'g_type_class_add_private'Pablo Barciela1-3/+2
2019-08-16ev-view-accessible: avoid 'g_type_class_add_private'Pablo Barciela1-5/+3
2019-08-10DPI: compute monitor resolution or get screen resolutionrbuj2-20/+23
2019-08-01Fix build warning on marshallingraveit651-1/+1
Replace deprecated --header --body options inspired by: https://gitlab.gnome.org/GNOME/evince/commit/f6952c2
2019-07-01Remove trailing whitespacesLaurent Napias14-266/+266
2019-06-26Bump Cairo version to 1.14.0Matthew Petroff2-14/+0
such that hi-dpi conditionals aren't needed. origin commit: https://github.com/linuxmint/xreader/commit/df3cdc6
2018-10-20EvView: Fix cursor movement when logical and visual line order differsColomban Wendling1-0/+10
Make sure not to move the caret in the wrong direction when restoring the visual line X offset, in case the visual and logical order is slightly different. The algorithm used to move the cursor on the next line and restore the X position across lines works as follows: 1. Move `cursor_offset` to the next line by incrementing it until reaching a line break; 2. Find the Y coordinate corresponding to the new cursor_offset; 3. Find the text closest to the new Y coordinate and the previous X coordinate. 4. Move cursor_offset to the text at this new (X, Y) location. The issue lies in step 3, which can find a position on a different line than expected in case several lines have a nearly the same Y position. Evince references: * https://gitlab.gnome.org/GNOME/evince/issues/889 * https://gitlab.gnome.org/GNOME/evince/merge_requests/81 * https://gitlab.gnome.org/GNOME/evince/commit/dddd98b4c7922e2906bba6a31afa07837ae6c39c
2018-07-18presentation: avoid deprecated 'gtk_style_context_set_background'Pablo Barciela1-3/+0