Gentoo Archives: gentoo-commits

From: "Peter Alfredsen (loki_val)" <loki_val@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/epdfview/files: epdfview-0.1.7-mouse-scrolling.patch
Date: Sun, 26 Apr 2009 14:28:58
Message-Id: E1Ly5Lj-0007fn-Uy@stork.gentoo.org
1 loki_val 09/04/26 14:28:55
2
3 Modified: epdfview-0.1.7-mouse-scrolling.patch
4 Log:
5 Run dos2unix on mouse-scrolling patch
6 (Portage version: 2.2_rc28/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.2 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.2&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.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch?r1=1.1&r2=1.2
14
15 Index: epdfview-0.1.7-mouse-scrolling.patch
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/app-text/epdfview/files/epdfview-0.1.7-mouse-scrolling.patch,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- epdfview-0.1.7-mouse-scrolling.patch 26 Apr 2009 13:22:25 -0000 1.1
22 +++ epdfview-0.1.7-mouse-scrolling.patch 26 Apr 2009 14:28:55 -0000 1.2
23 @@ -1,60 +1,60 @@
24 -Index: /trunk/src/gtk/MainView.cxx
25 -===================================================================
26 ---- /trunk/src/gtk/MainView.cxx (revision 325)
27 -+++ /trunk/src/gtk/MainView.cxx (revision 329)
28 -@@ -78,5 +78,5 @@
29 - static void main_window_zoom_width_cb (GtkToggleAction *, gpointer);
30 - static void main_window_set_page_mode (GtkRadioAction *, GtkRadioAction *, gpointer);
31 --static void main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
32 -+static gboolean main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
33 -
34 - #if defined (HAVE_CUPS)
35 -@@ -1480,5 +1480,5 @@
36 - }
37 -
38 --void
39 -+gboolean
40 - main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data)
41 - {
42 -@@ -1487,10 +1487,17 @@
43 - MainPter *pter = (MainPter *)data;
44 - // Only zoom when the CTRL-Button is down...
45 -- if ( !(event->state & GDK_CONTROL_MASK) ) return;
46 -- if ( event->direction == GDK_SCROLL_UP ) {
47 -- pter->zoomInActivated ();
48 -- } else if ( event->direction == GDK_SCROLL_DOWN ) {
49 -- pter->zoomOutActivated ();
50 -- }
51 --}
52 --
53 -+ if ( GDK_CONTROL_MASK == (event->state & GDK_CONTROL_MASK) )
54 -+ {
55 -+ if ( event->direction == GDK_SCROLL_UP )
56 -+ {
57 -+ pter->zoomInActivated ();
58 -+ }
59 -+ else if ( event->direction == GDK_SCROLL_DOWN )
60 -+ {
61 -+ pter->zoomOutActivated ();
62 -+ }
63 -+ return TRUE;
64 -+ }
65 -+ return FALSE;
66 -+}
67 -+
68 -Index: /trunk/src/gtk/PageView.cxx
69 -===================================================================
70 ---- /trunk/src/gtk/PageView.cxx (revision 325)
71 -+++ /trunk/src/gtk/PageView.cxx (revision 329)
72 -@@ -528,11 +528,4 @@
73 - g_assert ( NULL != data && "The data parameter is NULL.");
74 -
75 -- // don't scroll when the CRTL-Button is down, because then the page should
76 -- // actually be zoomed and not scrolled. Zooming is handelt by the MainView
77 -- // class.
78 -- if ( event->state & GDK_CONTROL_MASK )
79 -- {
80 -- return FALSE;
81 -- }
82 - PagePter *pter = (PagePter *)data;
83 - GtkAdjustment *adjustment =
84 +Index: /trunk/src/gtk/MainView.cxx
85 +===================================================================
86 +--- /trunk/src/gtk/MainView.cxx (revision 325)
87 ++++ /trunk/src/gtk/MainView.cxx (revision 329)
88 +@@ -78,5 +78,5 @@
89 + static void main_window_zoom_width_cb (GtkToggleAction *, gpointer);
90 + static void main_window_set_page_mode (GtkRadioAction *, GtkRadioAction *, gpointer);
91 +-static void main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
92 ++static gboolean main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data);
93 +
94 + #if defined (HAVE_CUPS)
95 +@@ -1480,5 +1480,5 @@
96 + }
97 +
98 +-void
99 ++gboolean
100 + main_window_page_scrolled_cb (GtkWidget *widget, GdkEventScroll *event, gpointer data)
101 + {
102 +@@ -1487,10 +1487,17 @@
103 + MainPter *pter = (MainPter *)data;
104 + // Only zoom when the CTRL-Button is down...
105 +- if ( !(event->state & GDK_CONTROL_MASK) ) return;
106 +- if ( event->direction == GDK_SCROLL_UP ) {
107 +- pter->zoomInActivated ();
108 +- } else if ( event->direction == GDK_SCROLL_DOWN ) {
109 +- pter->zoomOutActivated ();
110 +- }
111 +-}
112 +-
113 ++ if ( GDK_CONTROL_MASK == (event->state & GDK_CONTROL_MASK) )
114 ++ {
115 ++ if ( event->direction == GDK_SCROLL_UP )
116 ++ {
117 ++ pter->zoomInActivated ();
118 ++ }
119 ++ else if ( event->direction == GDK_SCROLL_DOWN )
120 ++ {
121 ++ pter->zoomOutActivated ();
122 ++ }
123 ++ return TRUE;
124 ++ }
125 ++ return FALSE;
126 ++}
127 ++
128 +Index: /trunk/src/gtk/PageView.cxx
129 +===================================================================
130 +--- /trunk/src/gtk/PageView.cxx (revision 325)
131 ++++ /trunk/src/gtk/PageView.cxx (revision 329)
132 +@@ -528,11 +528,4 @@
133 + g_assert ( NULL != data && "The data parameter is NULL.");
134 +
135 +- // don't scroll when the CRTL-Button is down, because then the page should
136 +- // actually be zoomed and not scrolled. Zooming is handelt by the MainView
137 +- // class.
138 +- if ( event->state & GDK_CONTROL_MASK )
139 +- {
140 +- return FALSE;
141 +- }
142 + PagePter *pter = (PagePter *)data;
143 + GtkAdjustment *adjustment =