1 |
loki_val 09/04/26 13:22:25 |
2 |
|
3 |
Added: epdfview-0.1.7-mouse-scrolling.patch |
4 |
Log: |
5 |
Fix mouse-scrolling not working unless compiled with -O0. Changeset 329 from upstream. |
6 |
(Portage version: 2.2_rc28/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: epdfview-0.1.7-mouse-scrolling.patch |
15 |
=================================================================== |
16 |
Index: /trunk/src/gtk/MainView.cxx |
17 |
=================================================================== |
18 |
--- /trunk/src/gtk/MainView.cxx (revision 325) |
19 |
+++ /trunk/src/gtk/MainView.cxx (revision 329) |
20 |
@@ -78,5 +78,5 @@ |
21 |
static void main_window_zoom_width_cb (GtkToggleAction *, gpointer); |
22 |
static void main_window_set_page_mode (GtkRadioAction *, GtkRadioAction *, gpointer); |
23 |
-static void main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data); |
24 |
+static gboolean main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data); |
25 |
|
26 |
#if defined (HAVE_CUPS) |
27 |
@@ -1480,5 +1480,5 @@ |
28 |
} |
29 |
|
30 |
-void |
31 |
+gboolean |
32 |
main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data) |
33 |
{ |
34 |
@@ -1487,10 +1487,17 @@ |
35 |
MainPter *pter = (MainPter *)data; |
36 |
// Only zoom when the CTRL-Button is down... |
37 |
- if ( !(event->state & GDK_CONTROL_MASK) ) return; |
38 |
- if ( event->direction == GDK_SCROLL_UP ) { |
39 |
- pter->zoomInActivated (); |
40 |
- } else if ( event->direction == GDK_SCROLL_DOWN ) { |
41 |
- pter->zoomOutActivated (); |
42 |
- } |
43 |
-} |
44 |
- |
45 |
+ if ( GDK_CONTROL_MASK == (event->state & GDK_CONTROL_MASK) ) |
46 |
+ { |
47 |
+ if ( event->direction == GDK_SCROLL_UP ) |
48 |
+ { |
49 |
+ pter->zoomInActivated (); |
50 |
+ } |
51 |
+ else if ( event->direction == GDK_SCROLL_DOWN ) |
52 |
+ { |
53 |
+ pter->zoomOutActivated (); |
54 |
+ } |
55 |
+ return TRUE; |
56 |
+ } |
57 |
+ return FALSE; |
58 |
+} |
59 |
+ |
60 |
Index: /trunk/src/gtk/PageView.cxx |
61 |
=================================================================== |
62 |
--- /trunk/src/gtk/PageView.cxx (revision 325) |
63 |
+++ /trunk/src/gtk/PageView.cxx (revision 329) |
64 |
@@ -528,11 +528,4 @@ |
65 |
g_assert ( NULL != data && "The data parameter is NULL."); |
66 |
|
67 |
- // don't scroll when the CRTL-Button is down, because then the page should |
68 |
- // actually be zoomed and not scrolled. Zooming is handelt by the MainView |
69 |
- // class. |
70 |
- if ( event->state & GDK_CONTROL_MASK ) |
71 |
- { |
72 |
- return FALSE; |
73 |
- } |
74 |
PagePter *pter = (PagePter *)data; |
75 |
GtkAdjustment *adjustment = |