aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-03-01 07:29:14 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-03-01 07:29:14 -0700
commita6d664de65542e7bd352027b739fe777f3e8c267 (patch)
tree2d38f0ea12b446cda6a7d8225ee3ac33aac6a8f1
parentbbe73c757a12abc857d263aac04fc1cdeaa78f6e (diff)
downloadsscan-a6d664de65542e7bd352027b739fe777f3e8c267.tar.gz
tidy up
-rw-r--r--Main.hs3
-rw-r--r--UI.hs15
2 files changed, 3 insertions, 15 deletions
diff --git a/Main.hs b/Main.hs
index c2ba55d..10685f9 100644
--- a/Main.hs
+++ b/Main.hs
@@ -111,6 +111,9 @@ makeInitialState = do
scanPage :: St -> FilePath -> IO ()
scanPage st dir = do
outH <- openFile outF WriteMode
+ -- TODO if scanimage exists non-zero, inform the user that we will
+ -- abort the scan session, pause for them to read the output, and then
+ -- abort the scan session
createProcessWait_ "scanimage" (proc "scanimage" (scanimageArgs st))
{ std_in = NoStream
, std_out = UseHandle outH
diff --git a/UI.hs b/UI.hs
index c10e2cf..b685c18 100644
--- a/UI.hs
+++ b/UI.hs
@@ -110,21 +110,6 @@ handleSPC st = undefined
handleESC :: St -> EventM () (Next St)
handleESC st = undefined
-beginScanSess :: St -> EventM () St
-beginScanSess st = undefined
-
-abortScanSess :: St -> EventM () (Next St)
-abortScanSess st = undefined
-
-finishScanSess :: St -> EventM () (Next St)
-finishScanSess st = undefined
-
--- run scanimage with appropriate arguments. If scanimage exists
--- non-zero, inform the user that we will abort the scan session,
--- pause for them to read the output, and then abort the scan session
-scanNextPage :: St -> IO St
-scanNextPage st = undefined
-
handleHotKey :: St -> Char -> EventM () (Next St)
handleHotKey st 'q' = handleQ st
handleHotKey st ' ' = handleSPC st