Submitted By:            Agathoklis Hatzimanikas <ag at linuxfromscratch dot org>
Date:                    2010-01-25
Initial Package Version: 0.1.7
Upstream Status:         Applied
Origin:                  Upstream
Description:             http://trac.emma-soft.com/epdfview/ticket/118

diff -Naur epdfview-0.1.7.orig/src/gtk/MainView.cxx epdfview-0.1.7/src/gtk/MainView.cxx
--- epdfview-0.1.7.orig/src/gtk/MainView.cxx	2009-02-28 23:00:55.000000000 +0200
+++ epdfview-0.1.7/src/gtk/MainView.cxx	2010-01-25 12:29:10.626636450 +0200
@@ -77,7 +77,7 @@
 static void main_window_zoom_out_cb (GtkWidget *, gpointer);
 static void main_window_zoom_width_cb (GtkToggleAction *, gpointer);
 static void main_window_set_page_mode (GtkRadioAction *, GtkRadioAction *, gpointer);
-static void main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
+static gboolean main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
 
 #if defined (HAVE_CUPS)
 static void main_window_print_cb (GtkWidget *, gpointer);
@@ -1479,18 +1479,25 @@
     pter->setPageMode (mode);
 }
 
-void 
+gboolean 
 main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data)
 {
     g_assert ( NULL != data && "The data parameter is NULL.");
 
     MainPter *pter = (MainPter *)data;
     // Only zoom when the CTRL-Button is down...
-    if ( !(event->state & GDK_CONTROL_MASK) ) return;
-    if ( event->direction == GDK_SCROLL_UP ) {
-        pter->zoomInActivated ();
-    } else if ( event->direction == GDK_SCROLL_DOWN ) {
-        pter->zoomOutActivated ();
+    if ( GDK_CONTROL_MASK == (event->state & GDK_CONTROL_MASK) )
+    {
+        if ( event->direction == GDK_SCROLL_UP )
+        {
+            pter->zoomInActivated ();
+        }
+        else if ( event->direction == GDK_SCROLL_DOWN )
+        {
+            pter->zoomOutActivated ();
+        }
+        return TRUE;
     }
+    return FALSE;
 }
 
diff -Naur epdfview-0.1.7.orig/src/gtk/PageView.cxx epdfview-0.1.7/src/gtk/PageView.cxx
--- epdfview-0.1.7.orig/src/gtk/PageView.cxx	2009-02-28 23:00:35.000000000 +0200
+++ epdfview-0.1.7/src/gtk/PageView.cxx	2010-01-25 12:29:10.626636450 +0200
@@ -527,13 +527,6 @@
 {
     g_assert ( NULL != data && "The data parameter is NULL.");
 
-    // don't scroll when the CRTL-Button is down, because then the page should
-    // actually be zoomed and not scrolled. Zooming is handelt by the MainView
-    // class.
-    if ( event->state & GDK_CONTROL_MASK )
-    {
-        return FALSE;
-    }
     PagePter *pter = (PagePter *)data;
     GtkAdjustment *adjustment = 
         gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (widget));
