tags 608226 pending
thanks

The attached patch fixes the problem and is applied in the next release.
From b3e53a10af569753599b86fad3e24dbb534856db Mon Sep 17 00:00:00 2001
From: Jeffrey Ratcliffe <jeffrey.ratcli...@gmail.com>
Date: Tue, 4 Jan 2011 14:39:53 +0100
Subject: [PATCH] Ask before clearing all pages

---
 History          |    2 ++
 bin/gscan2pdf    |   15 +++++++++++++++
 debian/changelog |    1 +
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/History b/History
index 1f29f59..7e289c9 100644
--- a/History
+++ b/History
@@ -26,6 +26,8 @@
   Closes LP: #654771
 * Use trick from Jakub Wilk to avoid hardcoding tessdata path
 * Deal better with errors from tesseract
+* Ask before clearing all pages
+  Closes Debian bug #608226
 
 
 0.9.31 (19.07.2010):
diff --git a/bin/gscan2pdf b/bin/gscan2pdf
index 4f4bfd7..686f474 100755
--- a/bin/gscan2pdf
+++ b/bin/gscan2pdf
@@ -1892,6 +1892,21 @@ sub get_pixbuf {
 
 sub new {
 
+ # Check that all pages have been saved
+ for ( my $i = 0 ; $i < @{ $slist->{data} } ; $i++ ) {
+  if ( !$slist->{data}[$i][5] ) {
+   my $response =
+     show_message_dialog( $window, 'question', 'ok-cancel',
+    $d->get("Some pages have not been saved.\nDo you really want to clear all pages?") );
+   if ( $response ne 'ok' ) {
+    return FALSE;
+   }
+   else {
+    last;
+   }
+  }
+ }
+
  # Update undo/redo buffers
  take_snapshot();
 
diff --git a/debian/changelog b/debian/changelog
index d430e3e..570f766 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ gscan2pdf (0.9.32~2) lucid; urgency=low
 
   * New upstream release
     Closes: #599181 (gscan2pdf: OCR doesn't support Umlauts/national characters)
+    Closes: #608226 (pressing space causes unexpected data loss)
     New Depends: liblog-log4perl-perl
     Removed Depends: libarchive-tar-perl, as now in perl
   * Removed debian/patches/replace-forks-with-threads 
-- 
1.7.1

Attachment: signature.asc
Description: Digital signature

Reply via email to