Commit Graph

63 Commits (883b3e3a4f55936379e1c06b1fa09db270143ee0)

Author SHA1 Message Date
Manos Pitsidianakis 883b3e3a4f
mail/view: show multipart/alternative files properly in attachment list
Show entire multipart/alternative alternatives in attachment list
instead of only the displayed one, in order for the user to be able to
switch alternatives at will.
2020-11-28 15:59:25 +02:00
Manos Pitsidianakis 98c1ece28d
Update xdg-util dependency to 0.4.0 2020-11-28 15:59:25 +02:00
Manos Pitsidianakis 54b2066f73
mail/view: set dirty after closing ContactSelector 2020-11-25 21:19:22 +02:00
Manos Pitsidianakis 879af75d88
utilities/dialogs: use align_area to create box 2020-11-25 21:19:22 +02:00
Manos Pitsidianakis 0a8a0c04c8
compose: treat inline message/rfc822 as attachments 2020-11-24 14:28:28 +02:00
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
2020-11-24 10:36:31 +02:00
Manos Pitsidianakis bf56c88918
compose: respect auto_choose_multipart_alternative when rendering multipart/alternative attachments to text 2020-11-24 10:36:31 +02:00
Manos Pitsidianakis 73372ff1e7
compose: add show_comments arg to attachment_displays_to_text()
Toggle display of attachment comments (for example "this html attachment
was rendered with X filter...") when rendering text.
2020-11-24 10:36:21 +02:00
Manos Pitsidianakis a702a04043
melib/attachments: add SMIME signature variant 2020-10-16 12:47:16 +03:00
Manos Pitsidianakis 5acd7dfe1c
mail/view: prevent spurious redraw in special modes 2020-10-16 12:40:02 +03:00
Manos Pitsidianakis 3949cecb75
mail/composer: add scrollbars 2020-10-16 12:37:01 +03:00
Manos Pitsidianakis e4cddbad25
mail/view: send NewJob event on new jobs
NewJob event wasn't sent so the message loading jobs were not accounted
in the busy spinner animation
2020-10-14 20:16:54 +03:00
Manos Pitsidianakis 0c68807814
Add export-mail command 2020-10-14 20:13:15 +03:00
Manos Pitsidianakis 9ce62c735a
compose: add key selection state for gpg operations
Closes #81
2020-10-11 18:11:04 +03:00
Manos Pitsidianakis a4b78532b7
Refactor job structs into JoinHandle
Put oneshot::channel<R> into JoinHandle<R>
2020-10-11 16:53:04 +03:00
Manos Pitsidianakis bc74379b27
mailview: don't process_event if coordinates uninitialised 2020-10-11 16:53:04 +03:00
Manos Pitsidianakis 23ca41e3e8
add libgpgme feature 2020-10-05 21:10:00 +03:00
Manos Pitsidianakis b9c07bacef
melib: decode text inline message/rfc822 attachments 2020-09-27 20:57:42 +03:00
Manos Pitsidianakis b0e50a29bd
melib/list_management: don't ignore "NO" in List-Post 2020-09-25 13:45:48 +03:00
Manos Pitsidianakis fadf20d7b1
NotificationType: add melib::ErrorKind 2020-09-13 15:23:14 +03:00
Manos Pitsidianakis c9a06b9b5c
mail/view: unset self.dirty early on draw 2020-09-12 23:39:07 +03:00
Manos Pitsidianakis bda5bd963a
mail/view: cache message body/text in MailView state 2020-09-10 21:19:38 +03:00
Manos Pitsidianakis f05dd379ae
Send NewJob event on all job startups 2020-09-10 21:19:38 +03:00
Manos Pitsidianakis be57b65dae
melib/email: add flags arg to Mail::new 2020-09-10 21:19:38 +03:00
Manos Pitsidianakis d57dd9c98e
melib/email/address: return Option in get_display_name 2020-09-10 21:19:38 +03:00
Manos Pitsidianakis c6c0da7fcb
melib: cleanup commit
Cleanup melib module exports, add some document tests, change some
documentation.
2020-09-10 21:19:38 +03:00
Manos Pitsidianakis 843616221e
Add logging level to Generic jobs
Not every job success should be shown to the user, for example updating
the sqlite3 database. So introduce a level to only show relevant
notifications.
2020-08-26 19:17:54 +03:00
Manos Pitsidianakis 14663e46b9
Remove some old TODO comments 2020-08-26 00:54:07 +03:00
Manos Pitsidianakis 53e924eb33
Add edit envelope action back as async 2020-08-26 00:54:06 +03:00
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
2020-08-26 00:54:06 +03:00
Manos Pitsidianakis 9928ee78e7
Add Reply{ToAuthor,ToAll} actions
- previous Reply action now lets you select recipients by default
- ReplyToAuthor selects the Envelope author as recipient
- ReplyToAll selects all addresses
2020-08-26 00:54:05 +03:00
Manos Pitsidianakis 8a6bf3b217
Preserve Account order from configuration file
Use IndexMap to preserve the order of accounts in the UI from the
account definitions.
2020-08-26 00:54:05 +03:00
Manos Pitsidianakis 2db983ae1f
mail/view.rs: try restarting future if get bytes fails 2020-07-27 15:06:56 +03:00
Manos Pitsidianakis 00acba7717
melib/MailBackend: add copy_messages,set_flags,delete_messages methods 2020-07-25 15:19:53 +03:00
Manos Pitsidianakis 77dc1d74bf
Add smtp client support for sending mail in UI
`mailer_command` was removed, and a new setting `send_mail` was added.

Its possible values are a string, consisting of a shell command to
execute, or settings to configure an smtp server connection. The
configuration I used for testing this is:

  [composing]
  send_mail = { hostname = "smtp.mail.tld", port = 587, auth = { type = "auto", username = "yoshi", password = { type = "command_eval", value = "gpg2 --no-tty -q -d ~/.passwords/msmtp/yoshi.gpg" } }, security = { type = "STARTTLS" } }

For local smtp server:
  [composing]
  send_mail = { hostname = "localhost", port = 25, auth = { type = "none" }, security = { type = "none" } }
2020-07-15 15:24:01 +03:00
Manos Pitsidianakis ddafde7b37
jobs: save handle for each Job
If we save the JoinHandle for each task, we can cancel it in future
commits if we have to timeout network requests.
2020-07-15 15:22:33 +03:00
Manos Pitsidianakis d914f7afd9
MailView: send NewJob event on mail body request 2020-07-08 13:43:48 +03:00
Manos Pitsidianakis a7e177586a
Fix clippy lints 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis bbedeed3e3
More imap async fixes 2020-07-06 15:27:06 +03:00
Manos Pitsidianakis b3876113aa
BackendOp: return future in as_bytes() 2020-07-06 15:26:39 +03:00
Manos Pitsidianakis efb06be09b
melib: return Result<_> from operation()
Envelope might have been deleted before main thread requests an
operation, which is a race condition.
2020-06-23 20:10:54 +03:00
Manos Pitsidianakis 02c881ac00
Add save-attachment option for entire message as eml 2020-06-15 01:07:50 +03:00
Manos Pitsidianakis 9edef4ecd2
ui: add attachment_tree() func in MailView
Split ascii attachment tree generation into a function in MailView
2020-06-07 14:35:41 +03:00
Manos Pitsidianakis 6ec249dd7f
melib: update nom dependency from 3.2.0 to 5.1.1
That was hecking exhausting
2020-06-06 23:19:07 +03:00
Manos Pitsidianakis bd404e6937
Execute user shell commands with /bin/sh
Execute user provided command invocations $CMD such as `editor_cmd` with
`/bin/sh` as `/bin/sh -c "$CMD"

Previously, user commands were split by whitespace which must trigger
erroneous behavior if quotes are involved.
2020-05-28 21:02:49 +03:00
Manos Pitsidianakis 4930d1b46c
Add Italics, Blink, Dim and Hidden text attributes
Text attributes have been rewritten as bit flags, so for example instead of
"BoldUnderline" you'd have to define "Bold | Underline" in your theme
settings.

Requested in #21
2020-04-05 15:57:05 +03:00
Manos Pitsidianakis e034f4dd52
view.rs: fix redrawing errors 2020-03-28 11:46:10 +02:00
Manos Pitsidianakis a3903ea2cb
Show Cc in default headers in mail view 2020-03-28 11:45:31 +02:00
Manos Pitsidianakis 9ff54f236b
Add conf_override! macro
conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.

The selection is done for a specific field as follows:

  if per-folder override is defined, return per-folder override
    else if per-account override is defined, return per-account override
      else return global setting field value.
2020-03-18 19:13:07 +02:00
Manos Pitsidianakis 106dae3334
Add config overrides to mailbox filter
If per-folder config filter is defined, it overrides the app-wide
filter.
2020-03-01 22:51:58 +02:00