Commit Graph

1101 Commits (0169025d503519f5223c9d29ae0c955177a91a6b)

Author SHA1 Message Date
Manos Pitsidianakis d8135674df
themes: add {even,odd}_unseen, {even,odd}_selected, {even,odd}_highlighted
Suggested in #21
2020-04-05 15:57:05 +03:00
Manos Pitsidianakis e633434b93
themes: Fix invalid attribute links panic in is_cyclic
Attribute links are not checked for validity in theme validation, and an
invalid link would cause a panic in is_cyclic.

This commit improves the theme validation errors by printing if the
error lies in a theme key or a link.
2020-04-05 15:57:05 +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 e9a935dbf7
melib: add search method in mail backends 2020-04-05 15:57:05 +03:00
Manos Pitsidianakis 3d7b9ff7cb
Move Query to melib 2020-04-05 15:57:05 +03:00
Manos Pitsidianakis c37d8bd331
imap: add mutex timeout lock and remove unwraps 2020-04-05 15:56:59 +03:00
Manos Pitsidianakis 5842a63e37
melib: ignore Draft body if empty for multipart mail 2020-04-04 19:17:16 +03:00
Manos Pitsidianakis ad2a51891b
melib: print attachment name in Display for text/* 2020-04-04 19:16:35 +03:00
Manos Pitsidianakis fd60be482f
Open sidebar for mailbox navigation with Left/Right arrow keys
Left/Right arrow keys change focus between the sidebar and mailbox
listing. If focused on sidebar, move arrow keys to select mailbox and
open with 'Enter'. Press Right arrow key to return to mailbox listing.

- Mailbox focused:
  +--+-------------+
  |~ |=============|
  |~ |=============|
  |  |=============|
  |~ |=============|
  |~ |=============|
  +--+-------------+
- Press `Left` arrow key
- Menu focused:
  +--------+-------+
  |~~~~    |=======|
  |~~      |=======|
  |        |=======|
  |~~~     |=======|
  |~~~~    |=======|
  +--------+-------+
- Press `Right` arrow key to return
2020-04-04 19:15:58 +03:00
Manos Pitsidianakis 840005022c
themes: add default tag theme attribute
The theme attribute key is "mail.listing.tag_default"
2020-04-03 10:13:27 +03:00
Manos Pitsidianakis 6ccb9d3d75
melib/src/email/address.rs: Fix invalid UTF8 panic
In StrBuilder::display there's an assumption that the string is valid utf-8 but if an email contains an invalid string inside the MIME encoded word part the conversion panics. Change it to a lossy UTF-8 conversion instead. Fixes #19

Reported-By: cycomanic
2020-04-02 08:22:12 +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 9afb636894
melib/email: fix whitespace duplication in mime encoding 2020-03-28 11:44:30 +02:00
Manos Pitsidianakis 8eca8b34ed
jmap: fix two error messages 2020-03-28 11:43:32 +02:00
Manos Pitsidianakis c77af98b26
imap: prevent deadlock in operations.rs
imap/operations.rs could deadlock with imap/watch.rs when both lock the
main IMAP connection but both also need to lock UIDStore
2020-03-25 13:12:18 +02:00
Manos Pitsidianakis 4c32bf450d
Add {un,}subscribe mailbox operations
Concerns #17
2020-03-24 21:05:06 +02:00
Manos Pitsidianakis 5c2b93ee18
jmap: add parser for rfc3339 dates
Reported-by:cycomanic
Concerns #18 https://git.meli.delivery/meli/meli/issues/18
2020-03-24 00:09:40 +02:00
Manos Pitsidianakis 61be6e4c96
notmuch: fix wrong mailbox path in save()
mailbox path was passed to save_to_mailbox() with a cur/ tail and
save_to_mailbox() added an extra cur/ tail
2020-03-18 19:22:17 +02:00
Manos Pitsidianakis 7a770c7f7b
imap: fetch RFC822 instead of RFC822.HEADER
RFC822.HEADER is not parsed in imap/protocol_parser.rs
2020-03-18 19:19:39 +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 a8c1016f37
Add various logic checks 2020-03-12 09:47:39 +02:00
Manos Pitsidianakis 6ca8c3b964
imap: add server_password_command 2020-03-12 09:45:18 +02:00
Manos Pitsidianakis 1811fb51cb
Fix unused imports/code compiler warnings 2020-03-04 22:11:37 +02:00
Manos Pitsidianakis b7175c2400
Fix compiler error in --no-default-features build 2020-03-04 22:04:57 +02:00
Manos Pitsidianakis 84d7e4c034
Small documentation fixes 2020-03-04 14:11:00 +02:00
Manos Pitsidianakis 31d90e1d87
Add managesieve.rs 2020-03-04 14:09:55 +02:00
Manos Pitsidianakis 651dda67cf
Respect autoload mailbox setting 2020-03-02 12:06:19 +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
Manos Pitsidianakis c19b9ec181
Add auto_choose_multipart_alternative to manpage 2020-03-01 20:58:24 +02:00
Manos Pitsidianakis a3600c0cd2
Add `filter` option in mail list
Filter mail in mail list.

Example:
[listing]
filter = "not flags:seen" # show only unseen messages
2020-03-01 20:24:00 +02:00
Manos Pitsidianakis 9d20fd5576
Save forked processes for reaping 2020-03-01 17:56:58 +02:00
Manos Pitsidianakis 6c76db2063
Add delete, copy actions for envelopes 2020-03-01 17:48:10 +02:00
Manos Pitsidianakis 2a9059f9b4
Add add-attachment from pipe, default_header_values 2020-03-01 17:45:55 +02:00
Manos Pitsidianakis 6079909f9c
imap: add managesieve connection
So far only the connection is implemented, and using the
testing/manage_sieve binary you can get a shell to a managesieve server.

The managesieve interface will be used in the UI from a plugin, but the
plugin's interface isn't implemented yet.
2020-02-28 15:47:07 +02:00
Manos Pitsidianakis 63467a3c45
Check ComponentId equality on Composer::kill() 2020-02-28 09:18:31 +02:00
Manos Pitsidianakis 63af2a688a
Detect breaks on write_string_to_grid 2020-02-28 09:17:30 +02:00
Manos Pitsidianakis f10cc954e7
Don't dump mail on Account drop 2020-02-28 09:16:50 +02:00
Manos Pitsidianakis a94bb1e27a
Show float notification on refresh cmd 2020-02-28 09:16:19 +02:00
Manos Pitsidianakis 670485e8c7
compose: clear bounds of compose area properly 2020-02-28 09:15:11 +02:00
Manos Pitsidianakis 7b631beb0a
Don't panic in WorkController::drop 2020-02-28 09:12:36 +02:00
Manos Pitsidianakis 6b2a1f7757
imap: Don't fail on WouldBlock on ImapBlockingConnection 2020-02-28 09:11:41 +02:00
Manos Pitsidianakis ca51077f53
imap: Add support for untagged FETCH (FLAG.. messages
IDLE connection can get untagged "* FETCH (FLAGS ({flag_list))" messages
if any client has changed flags. Support this refresh event.
2020-02-28 09:09:43 +02:00
Manos Pitsidianakis c1a64d6c33
Add imports in tag_hash macro 2020-02-28 09:04:01 +02:00
Manos Pitsidianakis 53fa3d03da
Notify embedded terminal on embedded process exit
When an embedded process exits the main process receives a SIGCHLD. The
check on whether the embedded process is alive is done on input, so
forward an input of '\0' to get the embedded terminal to notice its
child is dead.
2020-02-27 16:46:47 +02:00
Manos Pitsidianakis 126b65817e
Forward input on input/rawinput switch
Input thread listens on stdin input and forwards the input to the main
process. When an embedded terminal is launched within the main process,
the input thread is asked to switch to raw input, that is to send the
parsed input and the raw bytes to the main process in order to get them
forwarded to the embedded terminal. The switch happens by calling
get_events and get_events_raw.

When the input thread receives an InputCommand::{No,}Raw, it has already
received an input event, since the `select!` is within the
stdin events for loop. (There's no way to `select` on blocking iterators
or raw fds, which is unfortunate.).

This commit forwards the input to the next function instead of dropping
it.
2020-02-27 16:41:58 +02:00
Manos Pitsidianakis 7807f565ec
Clear input thread channel on restore()
The channel may contain Kill commands that will cause the new thread to
exit immediately.
2020-02-27 16:40:03 +02:00
Manos Pitsidianakis 65666e6695
Fix double call of restore_input
restore_input is called in State::rcv_event on arrival of a fork
finished event:

```
            UIEvent::Fork(ForkType::Finished) => {
                self.switch_to_main_screen();
                self.switch_to_alternate_screen();
                self.context.restore_input();
                return;
            }
```

So there shouldn't be an extra call here.
2020-02-27 16:37:42 +02:00
Manos Pitsidianakis c43f3564d3
Update README on notmuch feature 2020-02-27 16:36:47 +02:00
Manos Pitsidianakis bae083cc8f
Rename Filter action to search 2020-02-26 18:36:52 +02:00