summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJulien BLACHE <jblache@debian.org>2007-08-24 11:37:26 +0200
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:30 +0000
commit92f35807f68b30405639d4e0a95f748b6bdb793f (patch)
treeb5b61ce775cf052005d859fb11fd75f88903f4dc /debian/patches
parent69a9238dec08bc170599d8fbebf47d6a56b333c1 (diff)
Imported Debian patch 0.99+0.991-6debian/0.99+0.991-6
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/00list1
-rw-r--r--debian/patches/12_pbar_fixes.dpatch282
2 files changed, 283 insertions, 0 deletions
diff --git a/debian/patches/00list b/debian/patches/00list
index d0f048a..32beb13 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -2,4 +2,5 @@
03_gimp_acquire_menu
10_broken_links
11_contect_typo
+12_pbar_fixes
diff --git a/debian/patches/12_pbar_fixes.dpatch b/debian/patches/12_pbar_fixes.dpatch
new file mode 100644
index 0000000..5149b27
--- /dev/null
+++ b/debian/patches/12_pbar_fixes.dpatch
@@ -0,0 +1,282 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_pbar_fixes.dpatch by <jblache@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Reduce the number of updates/redraws on the progress bars by rounding
+## DP: the progress value. Patch by Joris van Rooij <jrrzz@il.fontys.nl>.
+
+@DPATCH@
+diff -urNad xsane-0.99+0.991~/src/xsane-save.c xsane-0.99+0.991/src/xsane-save.c
+--- xsane-0.99+0.991~/src/xsane-save.c 2006-01-10 18:46:32.000000000 +0100
++++ xsane-0.99+0.991/src/xsane-save.c 2007-08-24 11:18:28.915600727 +0200
+@@ -694,7 +694,7 @@
+ bytes_sum += bytes;
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) bytes_sum / size); /* update progress bar */
++ gtk_progress_bar_update(progress_bar, round((float) bytes_sum / size * 100) / 100); /* update progress bar */
+
+ while (gtk_events_pending())
+ {
+@@ -849,7 +849,7 @@
+ }
+
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height); /* update progress bar */
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100); /* update progress bar */
+ while (gtk_events_pending()) /* give gtk the chance to display the changes */
+ {
+ gtk_main_iteration();
+@@ -951,7 +951,7 @@
+ {
+ DBG(DBG_info2, "xsane_save_scaled_image: original line %d, new line %d\n", (int) y, y_new);
+
+- gtk_progress_bar_update(progress_bar, (float) y / original_image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / original_image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1135,7 +1135,7 @@
+
+ for (y = 0; y < new_image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1225,7 +1225,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+
+ while (gtk_events_pending())
+ {
+@@ -1418,7 +1418,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1627,7 +1627,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1769,7 +1769,7 @@
+
+ for (y = 0; y < pixel_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / pixel_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / pixel_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1826,7 +1826,7 @@
+
+ for (x=0; x<pixel_width; x++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) x / pixel_width);
++ gtk_progress_bar_update(progress_bar, round((float) x / pixel_width * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1880,7 +1880,7 @@
+
+ for (y = pixel_height-1; y >= 0; y--)
+ {
+- gtk_progress_bar_update(progress_bar, (float) (pixel_height - y) / pixel_height);
++ gtk_progress_bar_update(progress_bar, round((float) (pixel_height - y) / pixel_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1939,7 +1939,7 @@
+
+ for (x = pixel_width-1; x >= 0; x--)
+ {
+- gtk_progress_bar_update(progress_bar, (float) (pixel_width - x) / pixel_width);
++ gtk_progress_bar_update(progress_bar, round((float) (pixel_width - x) / pixel_width * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -1992,7 +1992,7 @@
+
+ for (y = 0; y < pixel_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / pixel_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / pixel_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -2051,7 +2051,7 @@
+
+ for (x = 0; x < pixel_width; x++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) x / pixel_width);
++ gtk_progress_bar_update(progress_bar, round((float) x / pixel_width * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -2105,7 +2105,7 @@
+
+ for (y = pixel_height-1; y >= 0; y--)
+ {
+- gtk_progress_bar_update(progress_bar, (float) (pixel_height - y) / pixel_height);
++ gtk_progress_bar_update(progress_bar, round((float) (pixel_height - y) / pixel_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -2164,7 +2164,7 @@
+
+ for (x = pixel_width-1; x >= 0; x--)
+ {
+- gtk_progress_bar_update(progress_bar, (float) (pixel_width - x) / pixel_width);
++ gtk_progress_bar_update(progress_bar, round((float) (pixel_width - x) / pixel_width * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -2767,7 +2767,8 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
++
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -2896,7 +2897,7 @@
+ break;
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -2940,7 +2941,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -3562,7 +3563,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -3754,7 +3755,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -3899,7 +3900,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -4013,7 +4014,7 @@
+
+ for (y = 0; y < image_info->image_height; y++)
+ {
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -4083,7 +4084,7 @@
+
+ count = 0;
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -4143,7 +4144,7 @@
+
+ count = 0;
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -4178,7 +4179,7 @@
+ fputc(val & 255, outfile); /* LSB */
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -4235,7 +4236,7 @@
+ fputc(val & 255, outfile); /* LSB */
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info->image_height);
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info->image_height * 100) / 100);
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -5199,7 +5200,7 @@
+ tile_offset = 0;
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info.image_height); /* update progress bar */
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info.image_height * 100) / 100); /* update progress bar */
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -5236,7 +5237,7 @@
+ tile_offset = 0;
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info.image_height); /* update progress bar */
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info.image_height * 100) / 100); /* update progress bar */
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -5280,7 +5281,7 @@
+ tile_offset = 0;
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info.image_height); /* update progress bar */
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info.image_height * 100) / 100); /* update progress bar */
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();
+@@ -5328,7 +5329,7 @@
+ tile_offset = 0;
+ }
+
+- gtk_progress_bar_update(progress_bar, (float) y / image_info.image_height); /* update progress bar */
++ gtk_progress_bar_update(progress_bar, round((float) y / image_info.image_height * 100) / 100); /* update progress bar */
+ while (gtk_events_pending())
+ {
+ gtk_main_iteration();