[cheese] thumbnav: fix scroll-event handling



commit d17386df398975378ba5be3c47c67c59583fe860
Author: Filippo Argiolas <filippo argiolas gmail com>
Date:   Sat Aug 8 14:13:56 2009 +0200

    thumbnav: fix scroll-event handling
    
    The scroll event should affect only the horizontal adjustment in
    horizontal mode and vice versa in vertical mode.

 src/eog-thumb-nav.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/eog-thumb-nav.c b/src/eog-thumb-nav.c
index 4e10e7e..38fd314 100644
--- a/src/eog-thumb-nav.c
+++ b/src/eog-thumb-nav.c
@@ -74,21 +74,16 @@ eog_thumb_nav_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer u
   gint inc = EOG_THUMB_NAV_SCROLL_INC * 3;
   gdouble value, upper, page_size;
 
+  nav->priv->adj = nav->priv->vertical ? nav->priv->vadj : nav->priv->hadj;
+
   switch (event->direction) {
   case GDK_SCROLL_UP:
-    nav->priv->adj = nav->priv->vadj;
-    inc *= -1;
-    break;
   case GDK_SCROLL_LEFT:
-    nav->priv->adj = nav->priv->hadj;
     inc *= -1;
     break;
 
   case GDK_SCROLL_DOWN:
-    nav->priv->adj = nav->priv->vadj;
-    break;
   case GDK_SCROLL_RIGHT:
-    nav->priv->adj = nav->priv->hadj;
     break;
 
   default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]