From d5c39015fb75662f5ae572aa04cdf20d5b8baac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Mon, 9 Sep 2013 16:13:53 -0300 Subject: Compose mode --- src/Lazymail/State.hs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/Lazymail/State.hs') diff --git a/src/Lazymail/State.hs b/src/Lazymail/State.hs index 1323118..bf1e3c2 100644 --- a/src/Lazymail/State.hs +++ b/src/Lazymail/State.hs @@ -29,6 +29,7 @@ initialState = LazymailState { , indexState = initialIndexState , composeState = initialComposeState , emailState = initialEmailState + , inputState = initialInputState , colorStyle = initialColorStyle } @@ -59,7 +60,18 @@ initialEmailState = EmailState { } initialComposeState = ComposeState { - composition = Nothing + composeFields = initialComposeFields + , bodyFileName = Nothing + , bodyReady = False +} + +initialComposeFields = ComposeFields { + fromField = Nothing + , toField = Nothing + , ccField = Nothing + , bccField = Nothing + , subjectField = Nothing + , replyToField = Nothing } initialColorStyle = ColorStyle { @@ -70,6 +82,13 @@ initialColorStyle = ColorStyle { , newEmailColorID = defaultColorID } +initialInputState = InputState { + inputRequested = False + , prompt = Nothing + , currentInput = "" + , postInputActions = return () +} + scrColsAsInteger st = toInteger $ screenColumns st scrRowsAsInteger st = toInteger $ screenRows st curRowAsInteger st = toInteger $ currentRow st -- cgit v1.2.3