summaryrefslogtreecommitdiff
path: root/debian/patches/0155-fix_spin_button_pagesize.patch
blob: 9fc1fdb3496ecbc7a7b5f2d678ced41ef304f907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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);