summaryrefslogtreecommitdiff
path: root/libview
AgeCommit message (Collapse)AuthorFilesLines
2017-09-06libview: merge get_caret_cursor_rect_from_offset and get_caret_cursor_areaCarlos Garcia Campos1-34/+22
Into a single function and use get_caret_cursor_area everywhere. get_caret_cursor_rect_from_offset() was a bit confusing, because it didn't return the cursor_rect, but the bbox of the character where the cursor should be at. The method that actually returns the cursor_rect is get_caret_cursor_area. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=13a5978
2017-09-06libview: Notify about caret navigation errors using the error bell.Antia Puentes1-0/+3
https://bugzilla.gnome.org/show_bug.cgi?id=702650 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=d0f449d
2017-09-06libview: Do not redraw after a click if cursor position hasn't changedCarlos Garcia Campos1-1/+2
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e118165
2017-09-06libview: Use GtkBindings for caret navigationCarlos Garcia Campos3-47/+114
This allows themes to override the key bindings and API users to move the caret cursor programmatically using g_signal_emit_by_name. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1206ff1
2017-09-06libview: Rename EvView::binding-activated signal as EvView::scrollCarlos Garcia Campos3-40/+43
EvView::binding-activated is too generic name for scroll key bindings. Renamed as EvView::scroll and changed to use GtkOrientable instead of a gboolean. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=b70e413
2017-09-06libview: Position the caret cursor by clickingAntia Puentes1-0/+53
https://bugzilla.gnome.org/show_bug.cgi?id=702071 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=153e67d
2017-09-06libview: Use EvPixbufCache to find selection regionJason Crain1-15/+11
Using view->selection_info.selections is inaccurate if the zoom changes, causing drag and drop of selected text to fail. This changes location_in_selected_text function to use the more accurate ev_pixbuf_cache_get_selection_region to find the selection region. https://bugzilla.gnome.org/show_bug.cgi?id=702406 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=abedcbd
2017-09-06libview: Split ev_pixbuf_cache_get_selection_surface into two functionsJason Crain3-36/+111
ev_pixbuf_cache_get_selection_surface returns the selection surface, and new function ev_pixbuf_cache_get_selection_region returns the selection region. https://bugzilla.gnome.org/show_bug.cgi?id=669022 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=90d6580
2017-09-06libview: Draw selection highlight from regionJason Crain3-40/+81
Allows a fallback for backends which can implement get_selection_region but not render_selection. Changes ev-pixbuf-cache so a redraw is only done when the scale changes. https://bugzilla.gnome.org/show_bug.cgi?id=669022 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=9e89fb1
2017-09-06libview: Fix the damage area used to redraw the caret cursorCarlos Garcia Campos1-42/+40
Move to a helper function the code to get the exact area where the caret should be drawn and use it to draw the care cursor and to invalidate the area when blinking. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=f5e7eb4
2017-09-06libview: Actually update the page when moving the care from a different pageCarlos Garcia Campos1-22/+43
I removed the line to set the current page after moving the caret cursor by mistake. Add it back and change cursor_go_to_next/previous_page to not update the page, but only update the cursor_page so that we have a single place where the page is updated after caret cursor moves. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=bf85030
2017-09-06libview: Avoid to update the current page and scroll to the cursor position, ↵Antia Puentes2-106/+133
if the caret cursor was not updated Move the caret cursor only when requested by the user. Keep the page where the caret cursor is in addition to the offset inside that page. https://bugzilla.gnome.org/show_bug.cgi?id=702068 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4d15ab5
2017-09-06libview: Make caret cursor blinkCarlos Garcia Campos2-84/+255
Based on GtkEntry and GtkTextView implementation, the caret cursor blinks when the view is active and caret navigation is enabled. It stops blinking after a while if there's no user interaction. It uses GtkSettings:gtk-cursor-blink-time and GtkSettings:gtk-cursor-blink-timeout. https://bugzilla.gnome.org/show_bug.cgi?id=702076 taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e6f7250
2017-09-06libview: Use logical attributes instead text layout to move the caret cursorCarlos Garcia Campos1-102/+77
taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=95f661b
2017-09-06libview: Add a way to get the text logical attributes from the page cacheCarlos Garcia Campos4-10/+73
It returns an array of PangoLogAttr with the logical attributes of the text for the given page. taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=6870279
2017-09-06libview: Initial implementation of caret navigationCarlos Garcia Campos3-4/+462
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 McCann4-57/+201
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 McCann2-19/+101
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 McCann2-22/+23
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 Campos2-17/+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 Machado2-0/+16
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 Campos3-5/+28
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ño2-0/+36
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 Diggs2-11/+15
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-28Change the opacity of the annotation windowGiselle Machado1-0/+27
Implements the functions needed to change the opacity of the annotation windows. https://bugzilla.gnome.org/show_bug.cgi?id=725571 origin commit: https://git.gnome.org/browse/evince/commit/?id=b968cfb
2017-08-28libview: Grab focus for form fields and links on mouse pressAntia Puentes2-144/+282
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 Cecchi2-0/+12
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-24ev-jobs: have ev_job_failed_from_error shadow ev_job_failedCosimo Cecchi1-0/+7
Since the latter uses varargs and will never be introspectable. https://bugzilla.gnome.org/show_bug.cgi?id=691354 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=1d87fc5
2017-08-24libview: add missing transfer and element-type annotationsCosimo Cecchi2-0/+17
https://bugzilla.gnome.org/show_bug.cgi?id=691354 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=4bc744c
2017-08-20gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions:ZenWalker1-0/+11
avoid deprecated: gdk_screen_get_monitor_geometry gdk_screen_get_monitor_at_window gdk_screen_get_monitor_at_point
2017-08-20avoid gdk_screen_get_primary_monitor/gdk_screen_get_monitor_scale_factorZenWalker1-2/+12
2017-08-20avoid deprecated gdk_screen_get_width/heightZenWalker2-6/+14
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 Chen2-21/+52
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 Lefebvre2-3/+21
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 Lefebvre2-0/+80
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 Lefebvre3-10/+64
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-14ev-annotation-window: Fix setting the color of the window borderJosephMcc1-16/+8
We need to actually connect to a change in the correct property to update this. In this case "rgba", not "color". We also need to prevent the system theme from affecting the color of the annotation window. taken from: https://github.com/linuxmint/xreader/commit/1236d4b
2017-08-14libview: fix annotation window focus change after creationNelson Benitez Leon1-9/+13
Be able to start entering text right after selecting or creating an annotation, also hide text cursor when window goes unfocused (backdrop state). https://bugzilla.gnome.org/show_bug.cgi?id=668446 taken from: https://git.gnome.org/browse/evince/commit/?id=fc8fe57
2017-08-14libview: Fix focus on ev_annotation_windowJosé Aliste1-21/+0
Make annotation windows always accept input focus. Based on patch by Florian Echtler. https://bugzilla.gnome.org/show_bug.cgi?id=668446 Taken from: https://git.gnome.org/browse/evince/commit/?id=24c1029
2017-08-14libview: Don't change the font color of the annotation windowCarlos Garcia Campos1-1/+0
We were using the annotation color, but it should only be used for the background of the annotation window. https://bugzilla.gnome.org/show_bug.cgi?id=677471 taken from: https://git.gnome.org/browse/evince/commit/?id=792d878
2017-08-12fix runtime warnings caused by previous HDPI commitraveit651-1/+1