Description: Fix spin buttons usage for newer versions of GTK+ 2.0
 Set adjustment page size to 0 for spin buttons. Fix for newer GTK
 versions, silences runtime warnings.
Author: Julien BLACHE <jblache@debian.org>
Forwarded: no

Index: trunk/src/xsane-back-gtk.c
===================================================================
--- trunk.orig/src/xsane-back-gtk.c
+++ trunk/src/xsane-back-gtk.c
@@ -2032,6 +2032,7 @@ void xsane_back_gtk_range_new(GtkWidget
       digits = 5;
     }
 #endif
+    gtk_adjustment_set_page_size(GTK_ADJUSTMENT(elem->data), 0);
     spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(elem->data), 0, digits);
 
     if (preferences.show_range_mode & 3) /* slider also visible */
@@ -2133,6 +2134,7 @@ void xsane_back_gtk_value_new(GtkWidget
     digits = 5;
   }
 #endif
+  gtk_adjustment_set_page_size(GTK_ADJUSTMENT(elem->data), 0);
   spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(elem->data), 0, digits);
 
   if (preferences.show_range_mode & 3) /* sliders are visible */
Index: trunk/src/xsane-front-gtk.c
===================================================================
--- trunk.orig/src/xsane-front-gtk.c
+++ trunk/src/xsane-front-gtk.c
@@ -1163,6 +1163,7 @@ void xsane_range_new(GtkBox *parent, cha
   /* spinbutton */
   if (preferences.show_range_mode & 4)
   {
+    gtk_adjustment_set_page_size(GTK_ADJUSTMENT(*data), 0);
     spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(*data), 0, digits);
     if (preferences.show_range_mode & 3) /* slider also visible */
     {
@@ -1255,6 +1256,7 @@ void xsane_range_new_with_pixmap(GdkWind
   /* spinbutton */
   if (preferences.show_range_mode & 4)
   {
+    gtk_adjustment_set_page_size(GTK_ADJUSTMENT(*data), 0);
     spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(*data), 0, digits);
     gtk_widget_set_size_request(spinbutton, 60, -1);
     xsane_back_gtk_set_tooltip(xsane.tooltips, spinbutton, desc);
