diff options
author | Peter Alfredsen <loki_val@gentoo.org> | 2009-04-26 13:22:25 +0000 |
---|---|---|
committer | Peter Alfredsen <loki_val@gentoo.org> | 2009-04-26 13:22:25 +0000 |
commit | 2398f76dc5261db7ec492fa8c9bb0e5f4216fb8c (patch) | |
tree | 3f5d970a8a4e3ae62270d7c14004719cdde6413b /app-text/epdfview/files | |
parent | Bump to 3.3.1. Fixes other half of #254931 (diff) | |
download | gentoo-2-2398f76dc5261db7ec492fa8c9bb0e5f4216fb8c.tar.gz gentoo-2-2398f76dc5261db7ec492fa8c9bb0e5f4216fb8c.tar.bz2 gentoo-2-2398f76dc5261db7ec492fa8c9bb0e5f4216fb8c.zip |
Fix mouse-scrolling not working unless compiled with -O0. Changeset 329 from upstream.
(Portage version: 2.2_rc28/cvs/Linux x86_64)
Diffstat (limited to 'app-text/epdfview/files')
-rw-r--r-- | app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch b/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch new file mode 100644 index 000000000000..2622a802ae30 --- /dev/null +++ b/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch @@ -0,0 +1,60 @@ +Index: /trunk/src/gtk/MainView.cxx
+===================================================================
+--- /trunk/src/gtk/MainView.cxx (revision 325)
++++ /trunk/src/gtk/MainView.cxx (revision 329)
+@@ -78,5 +78,5 @@
+ 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)
+@@ -1480,5 +1480,5 @@
+ }
+
+-void
++gboolean
+ main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data)
+ {
+@@ -1487,10 +1487,17 @@
+ 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;
++}
++
+Index: /trunk/src/gtk/PageView.cxx
+===================================================================
+--- /trunk/src/gtk/PageView.cxx (revision 325)
++++ /trunk/src/gtk/PageView.cxx (revision 329)
+@@ -528,11 +528,4 @@
+ 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 =
|