Index: gtk+2.0-2.10.13/gtk/gtkrange.c
===================================================================
--- gtk+2.0-2.10.13.orig/gtk/gtkrange.c	2007-09-18 11:06:04.000000000 +0200
+++ gtk+2.0-2.10.13/gtk/gtkrange.c	2007-09-18 11:09:31.000000000 +0200
@@ -1797,6 +1797,7 @@
 			    GdkScrollDirection  direction)
 {
   GtkAdjustment *adj = range->adjustment;
+  GtkOrientation ori = range->orientation;
   gdouble delta;
 
   if (GTK_IS_SCROLLBAR (range))
@@ -1804,12 +1805,31 @@
   else
     delta = adj->step_increment * 2;
   
-  if (direction == GDK_SCROLL_UP ||
-      direction == GDK_SCROLL_LEFT)
-    delta = - delta;
+      if (direction == GDK_SCROLL_UP ||
+          direction == GDK_SCROLL_LEFT)
+        delta = - delta;
   
-  if (range->inverted)
-    delta = - delta;
+  if (GTK_IS_SCROLLBAR (range))
+    {
+      if (range->inverted)
+        delta = - delta;
+    }
+  else
+    {
+      if (direction == GDK_SCROLL_UP ||
+          direction == GDK_SCROLL_DOWN)
+        {
+          if (ori == GTK_ORIENTATION_HORIZONTAL ||
+              range->inverted)
+            delta = - delta;
+        }
+      else
+        {
+          if (ori == GTK_ORIENTATION_HORIZONTAL &&
+              range->inverted)
+            delta = - delta;
+        }
+    }
 
   return delta;
 }
@@ -2074,31 +2094,33 @@
 gtk_range_scroll (GtkRange     *range,
                   GtkScrollType scroll)
 {
+  GtkOrientation ori = range->orientation;
+
   switch (scroll)
     {
     case GTK_SCROLL_STEP_LEFT:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) && should_invert (range))
         step_forward (range);
       else
         step_back (range);
       break;
                     
     case GTK_SCROLL_STEP_UP:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) || should_invert (range))
         step_forward (range);
       else
         step_back (range);
       break;
 
     case GTK_SCROLL_STEP_RIGHT:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) && should_invert (range))
         step_back (range);
       else
         step_forward (range);
       break;
                     
     case GTK_SCROLL_STEP_DOWN:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) || should_invert (range))
         step_back (range);
       else
         step_forward (range);
@@ -2113,28 +2135,28 @@
       break;
 
     case GTK_SCROLL_PAGE_LEFT:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) && should_invert (range))
         page_forward (range);
       else
         page_back (range);
       break;
                     
     case GTK_SCROLL_PAGE_UP:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) || should_invert (range))
         page_forward (range);
       else
         page_back (range);
       break;
 
     case GTK_SCROLL_PAGE_RIGHT:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) && should_invert (range))
         page_back (range);
       else
         page_forward (range);
       break;
                     
     case GTK_SCROLL_PAGE_DOWN:
-      if (should_invert (range))
+      if ((ori == GTK_ORIENTATION_HORIZONTAL) || should_invert (range))
         page_back (range);
       else
         page_forward (range);
