summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/00list1
-rw-r--r--debian/patches/20_spin_button_pagesize.dpatch67
2 files changed, 68 insertions, 0 deletions
diff --git a/debian/patches/00list b/debian/patches/00list
index 0ddc8c2..bd2cf8b 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -8,4 +8,5 @@
08_po_update_es_add_gl
09_cap_always_settable
10_broken_links
+20_spin_button_pagesize
diff --git a/debian/patches/20_spin_button_pagesize.dpatch b/debian/patches/20_spin_button_pagesize.dpatch
new file mode 100644
index 0000000..5d0018e
--- /dev/null
+++ b/debian/patches/20_spin_button_pagesize.dpatch
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_spin_button_pagesize.dpatch by <jblache@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Set adjustment page size to 0 for spin buttons. Fix for newer GTK
+## DP: versions, silences runtime warnings.
+
+@DPATCH@
+diff -urNad xsane-0.996~/src/xsane-back-gtk.c xsane-0.996/src/xsane-back-gtk.c
+--- xsane-0.996~/src/xsane-back-gtk.c 2009-12-27 08:29:40.150360818 +0100
++++ xsane-0.996/src/xsane-back-gtk.c 2009-12-27 08:33:48.722333851 +0100
+@@ -2029,6 +2029,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 */
+@@ -2130,6 +2131,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 */
+diff -urNad xsane-0.996~/src/xsane-front-gtk.c xsane-0.996/src/xsane-front-gtk.c
+--- xsane-0.996~/src/xsane-front-gtk.c 2009-12-27 08:29:40.102401618 +0100
++++ xsane-0.996/src/xsane-front-gtk.c 2009-12-27 08:35:49.749333893 +0100
+@@ -1161,6 +1161,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 */
+ {
+@@ -1254,6 +1255,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);
+diff -urNad xsane-0.996~/src/xsane.c xsane-0.996/src/xsane.c
+--- xsane-0.996~/src/xsane.c 2009-12-27 08:29:40.104334080 +0100
++++ xsane-0.996/src/xsane.c 2009-12-27 08:36:52.392332472 +0100
+@@ -1217,7 +1217,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);
+@@ -1314,7 +1314,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);