From 3bee2df64cfd3335640b34c5b87fcd290c01b7b4 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 3 Jul 2016 12:40:03 +0200 Subject: GTK+-3 libview: Fix compiler warnings Add dummy handling of the GDK_SCROLL_SMOOTH direction. taken from: https://git.gnome.org/browse/evince/commit/?id=231445d --- libview/ev-view-presentation.c | 4 ++++ libview/ev-view.c | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'libview') diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c index 9c14aff6..dadd0c6b 100644 --- a/libview/ev-view-presentation.c +++ b/libview/ev-view-presentation.c @@ -1413,6 +1413,10 @@ ev_view_presentation_scroll_event (GtkWidget *widget, case GDK_SCROLL_LEFT: ev_view_presentation_change_page (pview, GTK_SCROLL_PAGE_BACKWARD); break; +#if GTK_CHECK_VERSION (3, 0, 0) + case GDK_SCROLL_SMOOTH: + return FALSE; +#endif } return TRUE; diff --git a/libview/ev-view.c b/libview/ev-view.c index ccafff7b..bd14de6f 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -3471,6 +3471,11 @@ ev_view_scroll_event (GtkWidget *widget, GdkEventScroll *event) EvView *view = EV_VIEW (widget); guint state; +#if GTK_CHECK_VERSION (3, 0, 0) + if (event->direction == GDK_SCROLL_SMOOTH) + return FALSE; +#endif + state = event->state & gtk_accelerator_get_default_mod_mask (); if (state == GDK_CONTROL_MASK) { @@ -3516,6 +3521,10 @@ ev_view_scroll_event (GtkWidget *widget, GdkEventScroll *event) case GDK_SCROLL_LEFT: ev_view_previous_page (view); break; +#if GTK_CHECK_VERSION (3, 0, 0) + case GDK_SCROLL_SMOOTH: + g_assert_not_reached (); +#endif } return TRUE; -- cgit v1.2.1