Package: xsane / 0.998-6

fix_spin_button_pagesize.patch Patch series | download
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: xsane-0.998/src/xsane-back-gtk.c
===================================================================
--- xsane-0.998.orig/src/xsane-back-gtk.c	2011-02-04 19:50:46.000000000 +0100
+++ xsane-0.998/src/xsane-back-gtk.c	2011-02-04 19:54:55.581016002 +0100
@@ -2028,6 +2028,7 @@
       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 */
@@ -2129,6 +2130,7 @@
     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: xsane-0.998/src/xsane-front-gtk.c
===================================================================
--- xsane-0.998.orig/src/xsane-front-gtk.c	2011-02-04 19:50:46.000000000 +0100
+++ xsane-0.998/src/xsane-front-gtk.c	2011-02-04 19:54:55.581016002 +0100
@@ -1163,6 +1163,7 @@
   /* 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 @@
   /* 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);