Commit Graph

79 Commits (7af893597f5a3f3261bfff47dae0723bf1b17e53)

Author SHA1 Message Date
Manos Pitsidianakis 7af893597f conf/shortcuts.rs: replace use of Self::DESCRIPTION with Shortcuts struct consts 1 year ago
Manos Pitsidianakis 16646976d7 compose: fix reply subject prefixes stripping original prefix
Unintelligent heuristic but should cover most cases?

Configurable subject response prefix #142
https://git.meli.delivery/meli/meli/issues/142

Closes #142
2 years ago
Manos Pitsidianakis 94bd84b45d Fix clippy lints for `meli` crate 2 years ago
Manos Pitsidianakis cbe593cf31 mail/compose: add configurable header preample suffix and prefix for editing
This commit adds a new configuration value for the composing section of
settings. Quoting the documentation:

 wrap_header_preamble: Option<(String, String)>
 optional

 Wrap header preample when editing a draft in an editor. This allows you
 to write non-plain text email without the preamble creating syntax
 errors. They are stripped when you return from the editor. The values
 should be a two element array of strings, a prefix and suffix. This can
 be useful when for example you're writing Markdown; you can set the
 value to ["<!--",\ "-->"] which wraps the headers in an HTML comment.
2 years ago
Manos Pitsidianakis eb5949dc9b melib/error.rs: switch summary<->details identifiers
They are more intuitive like this.
2 years ago
Manos Pitsidianakis aa99b0d787 compose: implement configurable subject prefix stripping when replying
Introduce functionality to strip email subject from a set list of
prefixes or from a user set list.

Also, added a setting for the reply prefix (default is "Re:").

Closes #142
2 years ago
Manos Pitsidianakis a73885acb1 Improve embed terminal
- Add character attribute support
- Add cursor key mode support
- Fix buggy set fg / bg sequences

And added a bin under tools to test arbitrary apps using the embedded
terminal:

 cargo run -p tools --bin embed -- "htop" 2> .htop.debug.log
2 years ago
Manos Pitsidianakis f4e0970d46 mail/compose.rs: add ability to kill embed process
If embed editor process is unresponsive, there was no way to kill it.
Add force kill option by pressing Ctrl+C.
2 years ago
Manos Pitsidianakis 9cb66ef818 Fix all clippy warnings in `meli` crate 2 years ago
Manos Pitsidianakis e6d6e1f588 compose: don't unwrap if pseudoterminal creation fails
Show error notification instead.
2 years ago
Manos Pitsidianakis 2eb22a290a
Stop hardcoding certain component colors
`Color::Byte` references were before themes were introduced in the code
base. Their presence is a bug and they should all be replaced by theme
values.

Closes #124

Stop hardcoding certain component colors #124
https://git.meli.delivery/meli/meli/issues/124
2 years ago
Manos Pitsidianakis 81184b182c
Add extra_identities configuration flag
Closes #119

Multi identies per account #119 https://git.meli.delivery/meli/meli/issues/119
2 years ago
Manos Pitsidianakis 505adca54d
Add forward mail option
Forward email with shortcut 'forward' (default ctrl+f)

This opens a composing tab letting you to select receiver etc.

"composing" config setting "forward_as_attachment" selects the
forwarding behavior:

- "ask" asks you ever time
- true always forwards by attaching the entire email as a single
attachment
- false always forwards by inlining the email, like most email clients
do.

Closes #120
3 years ago
Manos Pitsidianakis 592339bdca
embed: split EmbedGrid to EmbedTerminal and EmbedGrid
An embedded pseudoterminal was enclosed in the EmbedGrid struct. This
commit splits it into EmbedTerminal and EmbedGrid, with EmbedGrid
containing only the CellBuffer grid logic. With this change we can reuse
EmbedGrid to parse ANSI output from external programs into meli's
CellBuffer's.
3 years ago
Manos Pitsidianakis 521f634e7b
melib/nntp: implement NNTP posting 3 years ago
Manos Pitsidianakis 22a64e2d76
melib: Remove unnecessary "pub use" std exports 3 years ago
Manos Pitsidianakis 622ded8021
compose: add attribution line for replies 3 years ago
Manos Pitsidianakis 6d63429ad3
Add scrolling context to StatusBar
- Whenever a scrolling context is entered/exited, send a ScrollUpdate event.
- StatusBar maintains a stack of scrolling contexts and displays the
last one, if it exists. Each context is associated with a ComponentId.
- To handle dangling contexts after their Components aren't visible
anymore, send a VisibilityChange event in situations where that scenario
is possible.
3 years ago
Manos Pitsidianakis ed826357a3
Don't unwrap try_recv() on async jobs channels
Job might have been canceled.
3 years ago
Manos Pitsidianakis 48e7a493a9
Add reload-config command
Closes #84 Add "reload configuration" command
4 years ago
Manos Pitsidianakis 879af75d88
utilities/dialogs: use align_area to create box 4 years ago
Manos Pitsidianakis b46cd09ca6
compose: pass body text when replying
Get rendered body text when creating a new reply Composer instead of
rendering the text in the Composer constructor.

Closes #86
4 years ago
Manos Pitsidianakis f69f623818
Fix some invalid area calculations 4 years ago
Manos Pitsidianakis 179ed52add
compose: grey embed area when embed is stopped
When stopping the embedded terminal with Ctrl-Z or SIGSTOP, show the
terminal area greyed out with a message box.
4 years ago
Manos Pitsidianakis ebc290cc2a
compose: set format flowed if configured in pager 4 years ago
Manos Pitsidianakis 1c62de57ae
Never return true on processing JobFinished
JobFinished events are not meant to be inhibited.
4 years ago
Manos Pitsidianakis 72084da185
Add store_sent_mail option for gmail
- store_sent_mail boolean

Store sent mail after successful submission.
This setting is meant to be disabled for non-standard behaviour in
gmail, which auto-saves sent mail on its own.
4 years ago
Manos Pitsidianakis afa74ccfb5
compose: add From text entry autocomplete 4 years ago
Manos Pitsidianakis bb51d36579
composer: send NewJob event on submission 4 years ago
Manos Pitsidianakis 3949cecb75
mail/composer: add scrollbars 4 years ago
Manos Pitsidianakis 6f31388b27
compose: add EditAttachments menu 4 years ago
Manos Pitsidianakis 5337a54d96
compose: move gpg mod to its own file 4 years ago
Manos Pitsidianakis b343530f0c
widgets: add button type parameter to FormWidget 4 years ago
Manos Pitsidianakis 9ce62c735a
compose: add key selection state for gpg operations
Closes #81
4 years ago
Manos Pitsidianakis 39fab67523
compose: use melib::Bytes pretty print for attachment size 4 years ago
Manos Pitsidianakis 0ca7b0042e
utilities: ensure Form/Button widgets are not always non-dirty 4 years ago
Manos Pitsidianakis 406af1848f
compose: add `add-attachment-file-picker` command 4 years ago
Manos Pitsidianakis a4b78532b7
Refactor job structs into JoinHandle
Put oneshot::channel<R> into JoinHandle<R>
4 years ago
Manos Pitsidianakis 0dd9e6a34b
compose: kill selectors on ComponentKill 4 years ago
Manos Pitsidianakis eb1cb5cec6
compose: expand cursor reach to attachment area 4 years ago
Manos Pitsidianakis be45b0c02d
compose: add encrypt layer 4 years ago
Manos Pitsidianakis a2f11c341d
compose: add async draft filter stack in sending mail
Add a stack of "filter" closures that edit a draft before sending it.
Add PGP signing filter. An encryption filter will be added in a future
commit.
4 years ago
Manos Pitsidianakis 08df7f39b2
Add toggle encrypt action in composer
Does nothing for now, will be used in a future commit.
4 years ago
Manos Pitsidianakis 23ca41e3e8
add libgpgme feature 4 years ago
Manos Pitsidianakis 83bee279e6
melib/email/compose: set attachment status
Set Content-Disposition: attachment to, well, attachments.
4 years ago
Manos Pitsidianakis fadf20d7b1
NotificationType: add melib::ErrorKind 4 years ago
Manos Pitsidianakis 20b02ffd4f
Lookup tag color/ignore settings in all three setting levels
There are three setting levels for tag settings:

- per mailbox override    ^
- per account override    |
- global setting          |
                        depth

So lookup in each of them in this order for configuration, not just the
deepest level.
4 years ago
Manos Pitsidianakis c6c0da7fcb
melib: cleanup commit
Cleanup melib module exports, add some document tests, change some
documentation.
4 years ago
Manos Pitsidianakis 14663e46b9
Remove some old TODO comments 4 years ago
Manos Pitsidianakis 8d50e83a33
melib/email: add case-insensitive Header struct
- HeaderName is either 32 or less inlined bytes or heap-allocated vec for more than that.
- Equality and hashing is case-insensitive
- A HeaderMap is a hashmap from HeaderName to Strings that can be
indexed with &str, case insensitive. Insertion order is also preserved
4 years ago