[simple-scan/gnome-3-36] Don't interrupt scanning if the device is busy.



commit 60e8ce7aa0184774664855e500642899658c1972
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Sat Apr 11 02:02:34 2020 +0200

    Don't interrupt scanning if the device is busy.
    
    After scan is finished, the scanner needs few of
    seconds to prepare for next scan. During that moment
    the device is in Sane.Status.DEVICE_BUSY state.
    Previously if the user press "Scan" button during that state,
    the message:
       "Unable to start scan" was be displayed.
    
    This patch fix that. After pressing Scan button in DEVICE_BUSY state,
    the application will keep trying start next scan.
    If the user would like to interrupt this loop, he could
    press "Stop" button.

 src/scanner.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/scanner.vala b/src/scanner.vala
index 466d517..29c729b 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -1293,6 +1293,10 @@ public class Scanner : Object
                     /* Error displayed when no documents at the start of scanning */
                     _("Document feeder empty"));
         }
+        else if (status == Sane.Status.DEVICE_BUSY)
+        {
+            /* If device is busy don't interrupt, but keep waiting for scanner */
+        }
         else
         {
             warning ("Unable to start device: %s", Sane.strstatus (status));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]