aboutsummaryrefslogtreecommitdiff
path: root/src/Lazymail/State.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-09 16:13:53 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-09 16:13:53 -0300
commitd5c39015fb75662f5ae572aa04cdf20d5b8baac7 (patch)
tree1e4db9af341a1565c241fb380467bdfd00b6c775 /src/Lazymail/State.hs
parent41b16df2db3920b59d1c13a468e848e68111058b (diff)
Compose mode
Diffstat (limited to 'src/Lazymail/State.hs')
-rw-r--r--src/Lazymail/State.hs21
1 files changed, 20 insertions, 1 deletions
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
nihil fit ex nihilo