summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/fix_spin_button_pagesize.patch68
-rw-r--r--debian/patches/series1
2 files changed, 69 insertions, 0 deletions
diff --git a/debian/patches/fix_spin_button_pagesize.patch b/debian/patches/fix_spin_button_pagesize.patch
new file mode 100644
index 0000000..9b981eb
--- /dev/null
+++ b/debian/patches/fix_spin_button_pagesize.patch
@@ -0,0 +1,68 @@
+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.997/src/xsane-back-gtk.c
+===================================================================
+--- xsane-0.997.orig/src/xsane-back-gtk.c 2010-05-31 19:35:46.406976445 +0200
++++ xsane-0.997/src/xsane-back-gtk.c 2010-05-31 19:36:33.583975801 +0200
+@@ -2031,6 +2031,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 */
+@@ -2133,6 +2134,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.997/src/xsane-front-gtk.c
+===================================================================
+--- xsane-0.997.orig/src/xsane-front-gtk.c 2010-05-31 19:35:46.421976568 +0200
++++ xsane-0.997/src/xsane-front-gtk.c 2010-05-31 19:36:33.584975905 +0200
+@@ -1166,6 +1166,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 */
+ {
+@@ -1261,6 +1262,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);
+Index: xsane-0.997/src/xsane.c
+===================================================================
+--- xsane-0.997.orig/src/xsane.c 2010-05-31 19:35:46.438976828 +0200
++++ xsane-0.997/src/xsane.c 2010-05-31 19:36:33.591976211 +0200
+@@ -1218,7 +1218,7 @@
+ gtk_widget_show(pixmapwidget);
+
+ /* adf pages maximum */
+- adjustment = gtk_adjustment_new(preferences.adf_pages_max, 1, 9999, 1, 10, 1);
++ adjustment = gtk_adjustment_new(preferences.adf_pages_max, 1, 9999, 1, 10, 0);
+ xsane_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 0, 0);
+ gtk_widget_set_size_request(xsane_spinbutton, 55, -1);
+ gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(xsane_spinbutton), FALSE);
+@@ -1317,7 +1317,7 @@
+
+
+ /* number of copies */
+- adjustment = gtk_adjustment_new(xsane.copy_number, 1, 99, 1, 10, 1);
++ adjustment = gtk_adjustment_new(xsane.copy_number, 1, 99, 1, 10, 0);
+ xsane_spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 0, 0);
+ gtk_widget_set_size_request(xsane_spinbutton, 40, -1);
+ gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(xsane_spinbutton), FALSE);
diff --git a/debian/patches/series b/debian/patches/series
index 618c204..1bf2ac2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ fix_message_typo.patch
i18n_po_update_es_add_gl.patch
i18n_po_update_fr.patch
fix_preview_mouse_events.patch
+fix_spin_button_pagesize.patch