Author: ag Date: 2010-01-25 07:09:17 -0700 (Mon, 25 Jan 2010) New Revision: 2157
Added: trunk/epdfview/epdfview-1.7-fix_scrolling-1.patch Log: Fixed a bug when scrolling with the mouse wheel Added: trunk/epdfview/epdfview-1.7-fix_scrolling-1.patch =================================================================== --- trunk/epdfview/epdfview-1.7-fix_scrolling-1.patch (rev 0) +++ trunk/epdfview/epdfview-1.7-fix_scrolling-1.patch 2010-01-25 14:09:17 UTC (rev 2157) @@ -0,0 +1,68 @@ +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)); -- http://linuxfromscratch.org/mailman/listinfo/patches FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
