summaryrefslogtreecommitdiff
path: root/libview/ev-view.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-06libview: Initial implementation of caret navigationCarlos Garcia Campos1-4/+453
Navigation by character, word, next/previous line and beginning/end of the line using the caret cursor. The routines to move the cursor don't use GtkTextBuffer to avoid the duplication of the text for every page. - Left/right arrow: Move one character to the left/right. - Up/down arrow: Move up/down one line. - Ctrl + left/right arrow: Move to the beginning/end of the previous/next word. - Home/End: Move to the beginning/end of the current line. https://bugzilla.gnome.org/show_bug.cgi?id=638905 taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1dc10fe
2017-09-06libview: Refactor code for drawing page and selection surfacesJosé Aliste1-43/+44
The code necessary to draw a page surface or a selection surface is the same. We factor this out to a new static method called draw_surface origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=3ab6ac1 libview: Fix rendering of the first visible page while resizing While we are resizing the view widget and waiting for a new surface rendered at the right size, we use old surfaces scaled to match the target size. When the begining of a page is not visible, the scaled surfaces are not placed correctly. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=72f2ae4
2017-08-31libview: only access the relevant page cache for the height requestTobias Mueller1-4/+6
In ev_view_get_height_to_page, the "height" or "dual_height" pointer can be set. If dual_height is set, the dual_height buffer is used. Using the "normal" height cache in dual view causes an out of bounds read. So we restrict the cache accesses to their relevant buffers. https://bugzilla.gnome.org/show_bug.cgi?id=771612 origin commit: https://git.gnome.org/browse/evince/commit/?id=0d44134
2017-08-31ev-view: Forward key events to the focused form fieldCarlos Garcia Campos1-20/+32
This allows to move between words with CTRL+Left/Right in text form fields instead of rotating the view. https://bugzilla.gnome.org/show_bug.cgi?id=699630 origin commit: https://git.gnome.org/browse/evince/commit/?id=ac22e8f
2017-08-31libview: Don't update current_page to negative numberGermán Poo-Caamaño1-1/+2
In continuous mode with dual page view, there is a chance that the pages were outside of the scroll view. When opening a document in such circumstances, the current page should not be updated to a negative number when already has the first page as default. This fixes a crash when searching with a negative current page. Fix https://bugzilla.gnome.org/show_bug.cgi?id=683172 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=8fe6917
2017-08-31libview: Make page layout a modeWilliam Jon McCann1-44/+120
Instead of having a few different mutually exclusive booleans it makes sense to have it be a mode with the following options: automatic, single, dual. This allows us to have a way to automatically determine if dual page mode should be used when the window is large enough. https://bugzilla.gnome.org/show_bug.cgi?id=689468 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=42f6d4b
2017-08-31libview: Add new zoom mode that optimizes for readabilityWilliam Jon McCann1-19/+100
This "Automatic" zoom mode will use fit width when the window is smaller than 100% of the actual page size and then use the actual page size up to the point the window is large enough to hold two entire pages side by side. https://bugzilla.gnome.org/show_bug.cgi?id=689468 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=0cad875
2017-08-31Rename Best Fit mode as Fit PageWilliam Jon McCann1-21/+21
https://bugzilla.gnome.org/show_bug.cgi?id=689468 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=ffd3853
2017-08-31Move dual page with odd pages left to the view menuCarlos Garcia Campos1-7/+2
As a toggle option only available in dual mode. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1078b8f
2017-08-31libview: drop deprecated usage of gtk_container_set_resize_moderaveit651-1/+0
see https://developer.gnome.org/gtk3/unstable/GtkContainer.html#gtk-container-set-resize-mode They aren’t necessary anymore since frame clocks and might introduce obscure bugs if used. Gtk3-inspector shows me that resize-mode-is-parent (default) is used.
2017-08-28Refreshing annotations' sidebar upon deletionGiselle Machado1-0/+14
When an annotation is deleted, the sidebar needs to be refreshed so that the annotation is removed from the list See item 3 in this comment: https://bugzilla.gnome.org/show_bug.cgi?id=649044#c33 origin commit: https://git.gnome.org/browse/evince/commit/?id=13defb2
2017-08-28page-cache: Add flags parameter to ev_page_cache_mark_dirty()Carlos Garcia Campos1-2/+2
This allows to specify what is dirty so that it's freed before being cached again. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-14&id=20c6b3b
2017-08-28libview: add ev_view_remove_annotationGermán Poo-Caamaño1-0/+34
Hide annotation windows if necessary and unset selected element before removing an annotation. https://bugzilla.gnome.org/show_bug.cgi?id=649044 origin commit: https://git.gnome.org/browse/evince/commit/?id=927e956
2017-08-28libview: Rename ev_view_set_focused_element and make it publicJoanmarie Diggs1-11/+11
internally This will be needed in order to implement atk_component_grab_focus https://bugzilla.gnome.org/show_bug.cgi?id=728475 origin commit: https://git.gnome.org/browse/evince/commit/?id=617dc0c
2017-08-28libview: Grab focus for form fields and links on mouse pressAntia Puentes1-143/+278
Rewritten focus annotations in a generic way. https://bugzilla.gnome.org/show_bug.cgi?id=706244 origin commit: https://git.gnome.org/browse/evince/commit/?id=fddb9ee
2017-08-28libview: Handle activation link of a Form Field if presentJosé Aliste1-0/+3
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=90e431d
2017-08-25libview: : avoid deprecated gtk_adjustment_changedraveit651-0/+2
gtk_adjustment_changed has been deprecated since version 3.18 and GTK+ emits “changed” itself whenever any of the properties (other than value) change. see https://developer.gnome.org/gtk3/unstable/GtkAdjustment.html#gtk-adjustment-changed
2017-08-24ev-job-find: mark two methods as skipCosimo Cecchi1-0/+6
Methods that use a double pointer to a GList cannot be annotated properly, so skip them until we have a better introspectable API. https://bugzilla.gnome.org/show_bug.cgi?id=691354
2017-08-20avoid deprecated gdk_screen_get_width/heightZenWalker1-3/+7
2017-08-18libview: Scroll small pages in non-continuous modeMarek Kasik1-14/+82
Check whether currently shown page fits actual view and allow user to scroll to previous/next page in that case (also in Dual page mode). Allow also scrolling if only one axis fits the view and the event happenned in the same axis. https://bugzilla.gnome.org/show_bug.cgi?id=562257 origin commit links: https://git.gnome.org/browse/evince/commit/?id=077bab6 https://git.gnome.org/browse/evince/commit/?id=45f527e
2017-08-18libview: Enable GDK_SMOOTH_SCROLL events for viewXiao-Long Chen1-21/+50
This enables the smooth/kinetic scrolling support found in GTK+ 3.3.18 with the document view, and handles them for the Ctrl+scroll, Shift+scroll, and non-continuous best-fit mode scrolling cases. https://bugzilla.gnome.org/show_bug.cgi?id=674098 origin commit link: https://git.gnome.org/browse/evince/commit/?id=34d0d5d
2017-08-18libview: Ctrl+mouse wheel zoom should be pointer-centered, not window-centeredClement Lefebvre1-3/+17
https://bugzilla.gnome.org/show_bug.cgi?id=731669 Upstream commit, Frédéric Moenne-loccoz committed with Carlos Garcia Campos on 15 Feb 2015: https://github.com/GNOME/evince/commit/9d9e14dfa9ae782e879961b7307f55b41b2a60b3
2017-08-18ev-view: Add pan gesture to switch pageClement Lefebvre1-0/+72
This only applies on non-continuous mode, and the page fits with no horizontal scrolling. The gesture is actually connected to the parent GtkScrolledWindow (tracked through hierarchy events), so it is able to interact with kinetic scrolling gestures there, and cancel those if the pan gesture is recognized. Upstream commits by garnacho on 6 May and 15 Aug 2014: https://github.com/GNOME/evince/commit/afc50e7e07c135e22137a33cbf9913713692bf49 https://github.com/GNOME/evince/commit/2280b09ec71ee88eeeb7fd8d02adb2985d17a765
2017-08-18ev-view: explicitly require a GtkScrolledWindow as the parent widgetClement Lefebvre1-0/+11
This is implicitly needed in a few places in code, so make the requirement explicit on ::parent-set. Upstream commit by garnacho on 11 Aug 2014: https://github.com/GNOME/evince/commit/6288e48
2017-08-18ev-view: Add pinch/zoom gesture to handle document zoomingClement Lefebvre1-10/+58
This is delegated on a GtkGestureZoom. When triggered, the document will be zoomed based on the distance changes between both fingers. When the gesture is not active, regular event handling (text selection, clicking, etc...) will happen. Upstream commit from garnacho on 28 Mar 2014: https://github.com/GNOME/evince/commit/36c7f21
2017-08-12Add hi-dpi support for main view.Matthew Petroff1-8/+24
Based on Evince commits 8b965e769808815df9c75a10a0e4972c0904d26a and a612f809e4e23d88a661a9604ce84f332189a658. https://github.com/linuxmint/xreader/commit/4eccf6b
2017-08-11libview: save changes to a dropdown in an embedded formraveit651-2/+2
This is a regression from commit https://github.com/mate-desktop/atril/commit/f8aec90 see: https://github.com/linuxmint/xreader/commit/46298df https://github.com/linuxmint/xreader/issues/12
2017-04-13build: require cairo >= 1.10.0 and drop some old codemonsta1-11/+0
2017-04-07ev-view: avoid deprecated gtk_drag_beginraveit651-6/+10
use gtk_drag_begin_with_coordinates instead
2017-03-07libview: Rename EvView coordinate transformation functionsraveit651-60/+49
and make them public internally taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=d4e458c
2017-03-07a11y: Do not use AtkFactory to create the EvViewAccessibleraveit651-47/+11
https://bugzilla.gnome.org/show_bug.cgi?id=685828 taken from: https://git.gnome.org/browse/evince/commit/?id=37c58de
2017-02-20First page should not reloadednanxiongchao1-4/+5
For the displayed page, do not reload every time, should be displayed immediately Tested successfully on Loongson 3A2000 with fedora25(mips64el distribution).
2016-11-23move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build optionmonsta1-404/+2
and require caja >= 1.17.1
2016-11-23fix indent a bitmonsta1-1/+1
2016-07-28libview: remove useless always-false conditionmonsta1-4/+0
from https://git.gnome.org/browse/evince/commit/?id=ebb480a2359cf9ce88cafd7babb034d2387d849c
2016-07-22Split dual mode option into dual mode with odd and even pages on the leftraveit651-26/+21
2016-07-03ev-view: add missing semicolon to gtk-doc commentraveit651-1/+1
g-ir-scanner will emit a warning otherwise. https://bugzilla.gnome.org/show_bug.cgi?id=691354 taken from: https://git.gnome.org/browse/evince/commit/?id=8ee8b7e
2016-07-03GTK+-3 libview: Fix compiler warningsraveit651-0/+9
Add dummy handling of the GDK_SCROLL_SMOOTH direction. taken from: https://git.gnome.org/browse/evince/commit/?id=231445d
2016-07-03ev-view: Fix compile warningraveit651-1/+1
taken from: https://git.gnome.org/browse/evince/commit/?id=4657961
2016-07-03GTK+-3.20 ev-view: Update EvView style to use CSS node nameraveit651-0/+4
2016-07-03Gtk+-3 ev-view: Set a style class on the view so it can be more easily styledraveit651-0/+15
And share the style we use for other content views. https://bugzilla.gnome.org/show_bug.cgi?id=653294 taken from: https://git.gnome.org/browse/evince/commit/?id=a56186e call gtk_style_context_set_background() Even if we now render a background in _draw() with gtk_render_background, using gtk_style_context_set_background() in realize makes the backing GdkWindow not being completely transparent, which enables GTK to apply optimizations during the paint cycle. The result is, especially in clutter-gtk applications such as Documents, scrolling in a document page is much smoother. taken from: https://git.gnome.org/browse/evince/commit/?id=1785924
2016-07-03GTK+-3 ev-view: Make EvView inherit from GtkContainer instead of GtkFixedraveit651-25/+212
It makes handling child widgets easier. Based on patch by José aliste, see bug http://bugzilla.gnome.org/show_bug.cgi?id=573748 taken from: https://git.gnome.org/browse/evince/commit/?id=de237e0
2016-06-29libview: Add an option to show odd pages on the left in dual moderaveit651-28/+33
Added a dual_even_left flag to EvView. When this flag is false, odd pages appear left instead of even ones. All the logic has been added to get_dual_even_left(). The patch is a bit more involved because build_height_to_page() was computing dual_even_left directly instead of calling get_dual_even_left(). Rather than implementing the logic twice, we replaced its EvDocument argument by its enclosing EvView in order to be able to call get_dual_even_left() directly. This function was renamed into ev_view_build_height_to_page_cache() to reflect it is now a view method. See http://bugzilla.gnome.org/show_bug.cgi?id=444587 taken from: https://git.gnome.org/browse/evince/commit/?id=f065e36
2016-06-29GTK+-3: Use ev_document_misc_get_pointer_position() instad of deprecated ↵raveit651-2/+34
gtk_widget_get_pointer()
2016-06-24libdocument: Make EvSourceLink boxed.raveit651-1/+1
https://bugzilla.gnome.org/show_bug.cgi?id=635705 taken from: https://git.gnome.org/browse/evince/commit/?id=0ac0898
2016-02-01fix some build warningsmonsta1-2/+0
2015-08-08use GObject instead of deprecated GtkObject in GTK+2 as wellMonsta1-26/+0
2014-12-10libview: clear caches after destroying child widgets.infirit1-1/+1
Taken from evince commit: 4de037ccccb4d836db43bf97fdaacf7c02ffb1f1 From: Marek Kašík <[email protected]>
2014-12-10libview: Save contents of FormTextFields when they loss focus.infirit1-1/+17
Taken from evince commit: c8104d3426a7bd7ce6570a87363e4edeea472fce From: José Aliste <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=624921
2014-12-10libview: remove all widgets from the View when reloading the docinfirit1-0/+1
Taken from evince commit: 8434736a712f5b93d1f3909221abe0b88096f78a From: José Aliste <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=632087