From 92f35807f68b30405639d4e0a95f748b6bdb793f Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 24 Aug 2007 11:37:26 +0200 Subject: Imported Debian patch 0.99+0.991-6 --- debian/changelog | 12 ++ debian/patches/00list | 1 + debian/patches/12_pbar_fixes.dpatch | 282 ++++++++++++++++++++++++++++++++++++ debian/rules | 1 + debian/xsane-common.links | 1 + debian/xsane.desktop | 2 +- 6 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 debian/patches/12_pbar_fixes.dpatch create mode 100644 debian/xsane-common.links diff --git a/debian/changelog b/debian/changelog index e4449e3..5dfe8fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +xsane (0.99+0.991-6) unstable; urgency=low + + * debian/patches/12_pbar_fixes.dpatch: + + Added; Reduce progress bar updates/redraws by rounding the progress + value. Patch by Joris van Rooij (closes: #432609). + * debian/xsane.desktop: + + Remove non-existent "Application" category. + * debian/xsane-common.links: + + Add an index.html symlink to sane-xsane-doc.html in the HTML doc. + + -- Julien BLACHE Fri, 24 Aug 2007 11:37:26 +0200 + xsane (0.99+0.991-5) unstable; urgency=low * debian/xsane.menu: 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 +## +## 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 . + +@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= 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(); diff --git a/debian/rules b/debian/rules index daa272b..7a628fd 100755 --- a/debian/rules +++ b/debian/rules @@ -130,6 +130,7 @@ binary-indep: build install dh_installman -i # dh_installinfo -i dh_installchangelogs -i + dh_link -i dh_compress -i dh_fixperms -i dh_installdeb -i diff --git a/debian/xsane-common.links b/debian/xsane-common.links new file mode 100644 index 0000000..00c171b --- /dev/null +++ b/debian/xsane-common.links @@ -0,0 +1 @@ +usr/share/doc/xsane-common/html/sane-xsane-doc.html usr/share/doc/xsane-common/html/index.html diff --git a/debian/xsane.desktop b/debian/xsane.desktop index df5c05d..c320bc5 100644 --- a/debian/xsane.desktop +++ b/debian/xsane.desktop @@ -14,5 +14,5 @@ Exec=xsane Icon=xsane Terminal=false Type=Application -Categories=GTK;Application;Graphics;RasterGraphics;Scanning;OCR; +Categories=GTK;Graphics;RasterGraphics;Scanning;OCR; StartupNotify=true -- cgit v1.2.3