diff options
author | Oz Tiram <[email protected]> | 2020-02-07 21:57:10 +0100 |
---|---|---|
committer | Robert Antoni Buj Gelonch <[email protected]> | 2020-06-18 10:48:28 +0200 |
commit | d1f4707aad8a1ecad412295d2ccd3f7aa87b95b0 (patch) | |
tree | 7c842894f3ae039e69f48d6f7c9ad02282908330 /libview | |
parent | eb8a049f0c2d19551397c9701b7c00921c4917c2 (diff) | |
download | atril-d1f4707aad8a1ecad412295d2ccd3f7aa87b95b0.tar.bz2 atril-d1f4707aad8a1ecad412295d2ccd3f7aa87b95b0.tar.xz |
Make synctex optional
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.
Diffstat (limited to 'libview')
-rw-r--r-- | libview/ev-view.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c index a195ba21..e98582d3 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -3210,6 +3210,7 @@ ev_view_remove_annotation (EvView *view, g_object_unref (annot); } +#ifdef ENABLE_SYNCTEX static gboolean ev_view_synctex_backward_search (EvView *view, gdouble x, @@ -3235,6 +3236,7 @@ ev_view_synctex_backward_search (EvView *view, return FALSE; } +#endif /* Caret navigation */ #define CURSOR_ON_MULTIPLIER 2 @@ -4078,8 +4080,10 @@ ev_view_draw (GtkWidget *widget, show_annotation_windows (view, i); if (page_ready && view->focused_element) draw_focus (view, cr, i, &clip_rect); +#ifdef ENABLE_SYNCTEX if (page_ready && view->synctex_result) highlight_forward_search_results (view, cr, i); +#endif } if (GTK_WIDGET_CLASS (ev_view_parent_class)->draw) @@ -4472,9 +4476,10 @@ ev_view_button_press_event (GtkWidget *widget, EvFormField *field; EvMapping *link; gint page; - +#ifdef ENABLE_SYNCTEX if (event->state & GDK_CONTROL_MASK) return ev_view_synctex_backward_search (view, event->x , event->y); +#endif if (EV_IS_SELECTION (view->document) && view->selection_info.selections) { if (event->type == GDK_3BUTTON_PRESS) { @@ -7522,6 +7527,7 @@ ev_view_find_cancel (EvView *view) view->find_pages = NULL; } +#ifdef ENABLE_SYNCTEX /*** Synctex ***/ void ev_view_highlight_forward_search (EvView *view, @@ -7549,6 +7555,7 @@ ev_view_highlight_forward_search (EvView *view, ensure_rectangle_is_visible (view, &view_rect); gtk_widget_queue_draw (GTK_WIDGET (view)); } +#endif /* ENABLE_SYNCTEX */ /*** Selections ***/ static gboolean |