[simple-scan/cherry-pick-60e8ce7a] Don't interrupt scanning if the device is busy.



commit c3eacd98be261d4c12c6714e7d45eda1c07995ad
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Sat Apr 11 00:02:34 2020 +0000

    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.
    
    
    (cherry picked from commit 60e8ce7aa0184774664855e500642899658c1972)

 src/scanner.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/scanner.vala b/src/scanner.vala
index ffef562..9474225 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -1249,6 +1249,10 @@ public class Scanner : Object
         {
             /* If device is busy don't interrupt, but keep waiting for scanner */
         }
+        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]