diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-25 22:19:35 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-25 22:19:35 -0700 |
commit | 007af28c2abe60fb4cb10482683a335a3366e462 (patch) | |
tree | 5c77ab61de0594d668660da4cb2c956c48f79015 /Main.hs | |
parent | 47a77b3d359d23166ee72462154617611fdfb98e (diff) | |
download | sscan-007af28c2abe60fb4cb10482683a335a3366e462.tar.gz |
store page count in app state
There has to be a place to store this or the UI cannot display the
number of pages scanned thus far.
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -35,7 +35,9 @@ drawUI st = [ui] , hBorderWithLabel (str "[ Actions ]") , vLimit 6 $ C.center $ actionsBox ] - status = str "Ready to scan first page" + status = str $ case st^.stPageCount of + Just n -> "Scanned " ++ show n ++ " pages" + Nothing -> "Ready to scan first page" settingsBox = defnList AlignRight Nothing [ ("run OCRmyPDF", if st^.stOCR then "yes" else "no") , ("colour data", show $ st^.stColour) @@ -139,6 +141,7 @@ main = do let paper = if papersize == "letter" then Letter else A4 initialState = St { _stScanningSession = Nothing + , _stPageCount = Nothing , _stOCR = True , _stColour = Greyscale , _stPaper = paper |