Manos Pitsidianakis
ec0153e7b2
melib: add protocol extension info in MailBackendCapabilities
2020-08-02 00:22:15 +03:00
Manos Pitsidianakis
3ac2c12e7a
Small fixes
2020-07-29 14:33:09 +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
70a4409e59
mail/listing*: various theme color fixes
2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
26b327d86a
mail/listing*: clear selection after perform_action()
2020-07-26 16:09:41 +03:00
Manos Pitsidianakis
3f8aa560f0
melib/MailBackend: add MailBackendCapabilities struct
2020-07-25 17:53:04 +03:00
Manos Pitsidianakis
4aaa784d8f
Fix panic on empty command history when browsing history
2020-07-25 16:34:53 +03:00
Manos Pitsidianakis
c2550f60b6
Rename EXECUTE mode to COMMAND
...
vim uses COMMAND, and we want to be consistent with vim when possible.
2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
b20bdea8f0
EXECUTE: cancel command with Esc
2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
989cfcc877
conf/accounts.rs: use mailbox alias if available in MailboxEntry::name()
2020-07-25 15:19:53 +03:00
Manos Pitsidianakis
ed3b2fa6c8
types.rs: add JobCanceled event
2020-07-25 15:19:53 +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
f9efaea0ec
ConversationsListing: fix invalid update_line colors
2020-07-25 15:17:35 +03:00
Manos Pitsidianakis
99fbac3806
Remove unused variables/functions
2020-07-23 13:39:58 +03:00
Manos Pitsidianakis
1bd89b3c96
themes: add mail.sidebar_account_name key
2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
0882dbbad0
melib/Collection: put all fields behind a mutex
2020-07-23 13:23:23 +03:00
Manos Pitsidianakis
b4dadf20b6
ThreadListing: don't print previous link on root envelopes
...
If a thread root is missing (i.e. we never received that message or it
was deleted) threads rendered like this:
├─>Re: original subject
├─>Re: original subject
└─>Re: original subject
This causes visual ambiguity if the parentless thread follows another:
Another thread
└─>Re: Another thread
├─>Re: original subject
├─>Re: original subject
└─>Re: original subject
This commit removes the "previous link" from every first message in a group:
┬─>Re: original subject
├─>Re: original subject
└─>Re: original subject
2020-07-17 13:33:40 +03:00
Manos Pitsidianakis
08d8c05a67
CompactListing: update self.rows{,_drawn} on row update
...
self.rows{,_drawn} were left unupdated, and stale envelope hashes could
result in panics
2020-07-17 00:04:59 +03:00
Manos Pitsidianakis
1bac926bdc
CompactListing: add row_attr macro
...
Add macro to calculate theme attribute for given thread row
2020-07-17 00:04:26 +03:00
Manos Pitsidianakis
5e1fa2d8d7
CompactListing: add select command
...
Select envelopes based on query
2020-07-17 00:03:35 +03:00
Manos Pitsidianakis
5ef62a39b8
conf: Rename cache_type to search_backend
2020-07-16 23:57:00 +03:00
Manos Pitsidianakis
587eaf7215
ThreadListing: add columns
2020-07-15 19:02:52 +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
9db6b07b71
Remove some needless clones and stuff (thanks to Clippy)
2020-07-13 21:36:55 +03:00
Manos Pitsidianakis
d914f7afd9
MailView: send NewJob event on mail body request
2020-07-08 13:43:48 +03:00
Manos Pitsidianakis
899d497c9c
Rename _cmd options to _command for consistency
2020-07-08 12:12:15 +03:00
Manos Pitsidianakis
bfc08f892d
Show account online error status in status tab
2020-07-08 12:10:14 +03:00
Manos Pitsidianakis
3a16dc6522
Show account online error status when offline
2020-07-08 12:10:14 +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
4721073bc3
Rename jobs1 to jobs
2020-07-06 15:26:39 +03:00
Manos Pitsidianakis
e06308fed2
MailBackend: change more methods to Futures
2020-07-06 15:26:00 +03:00
Manos Pitsidianakis
21051fa862
JobRequest: add more variants
2020-07-06 15:13:01 +03:00
Manos Pitsidianakis
c82367e00d
BackendOp: Change set_{flag,tag} methods
2020-07-06 15:12:33 +03:00
Manos Pitsidianakis
58aff83b95
Change "Draft saved" to "Message saved"
2020-06-26 21:12:57 +03:00
Manos Pitsidianakis
c0c19268ee
Add ProgressSpinner widget
2020-06-26 21:12:57 +03:00
Manos Pitsidianakis
c4bc7be5d1
Tabbed: correctly pass events to other children
...
When passing an event to the focused tab and it is not handled, the
other children weren't then each called to see if they handle the
event. That led to refresh events etc not being processed by the mail
list tab if it wasn't focused.
2020-06-23 20:11:05 +03:00
Manos Pitsidianakis
4ae7a57d45
Add save-draft command
2020-06-23 20:11:05 +03:00
Manos Pitsidianakis
bfbaf3d617
Utilize EnvelopeRemove events
...
EnvelopeRemove events were not ever used in the UI
2020-06-23 20:11:04 +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
b946b61cf1
terminal/cells.rs: remove unused variables
2020-06-23 17:31:25 +03:00
Manos Pitsidianakis
688a798fa2
XDGNotifications: increase rate limiting
...
3 notifications evenly spread per second did not make any sense.
Increase it to 1000 and see if it's ok
2020-06-22 17:31:18 +03:00
Manos Pitsidianakis
ca11c8e474
Remove useless debug prints
2020-06-22 11:33:03 +03:00
Manos Pitsidianakis
9fb86ab2f2
components: create layouts module in utilities
2020-06-21 12:51:49 +03:00
Manos Pitsidianakis
02c881ac00
Add save-attachment option for entire message as eml
2020-06-15 01:07:50 +03:00
Manos Pitsidianakis
cecd33eb5e
SVGScreenshotFilter: make svg smaller and fix grapheme cluster textLength inaccuracies
2020-06-13 01:15:24 +03:00
Manos Pitsidianakis
0618e62ab6
Add optional feature to save SVG screenshot
2020-06-12 01:37:57 +03:00
Manos Pitsidianakis
7dc8a87a62
Prevent sub overflow in EnvelopeView
2020-06-10 18:07:56 +03:00
Manos Pitsidianakis
f3d5edfe14
Add copy/move to other account operations
2020-06-08 22:11:43 +03:00
Manos Pitsidianakis
c07185a3aa
regexp: add priority field to regular expressions
2020-06-08 00:55:30 +03:00
Manos Pitsidianakis
465c78e903
Add Cell::keep_attrs() method
2020-06-08 00:55:29 +03:00
Manos Pitsidianakis
a17f0b4fd4
listing: rework MailListingTrait
...
split redraw_list() to redraw_threads_list() and redraw_envelope_list()
2020-06-07 14:35:41 +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
6458ccb860
meli: update nom dependency to 5.1.1
2020-06-06 23:22:26 +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
3e31c46a74
Add "regexp" feature, format text with regexps
...
`regexp` feature uses the pcre2 library to enable the user to define
regular expressions for matching text and applying text formatting to
the matches. An example from the theme configuration I used to test
this:
[terminal.themes.win95.text_format_regexps]
"listing.subject" = { "\\[[^\\]]*\\]" = { attrs = "Bold" } }
"listing.from" = { "\\<[^\\>]*\\>(?:(?:\\s*$)|(?=,))" = { attrs = "Italics" } }
[terminal.themes.win95.text_format_regexps."pager.envelope.body"]
"^>.*$" = { attrs = "Italics" }
"\\d+\\s?(?:(?:[KkMmTtGg]?[Bb])|(?:[KkMmTtGg][Bb]?)(?=\\s))" = { attrs = "Bold | Underline" }
2020-06-05 10:56:36 +03:00
Manos Pitsidianakis
049175e743
pager: fix filter invocation and ansi parsing
2020-05-31 22:37:06 +03:00
Manos Pitsidianakis
bee1baedb2
themes: add indentation level color keys
...
Add theme keys for the indentation level colors in ThreadView
2020-05-31 16:44:39 +03:00
Manos Pitsidianakis
9703b39a40
Add execute command parser to improve suggestions
...
Add grammar for execute commands and parser to identify possible next
tokens for the user's execute command input.
The grammar is given as a sequence of Tokens in each command's
definition. The parser parses the user's input according to this
grammar, and returns the tokens that could come next, if any.
2020-05-29 20:43:40 +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
7990b71c19
StatusBar: recognize readline shortcuts in Execute mode
2020-05-16 17:32:30 +03:00
Manos Pitsidianakis
295577f9d7
Fix invalid theme keys in ThreadListing
2020-05-16 12:44:20 +03:00
Manos Pitsidianakis
a86c1cbb26
listing: redraw on EnvelopeUpdate events
2020-05-11 21:01:40 +03:00
Manos Pitsidianakis
c5fe511d95
notmuch: don't remove tags from tag_index
...
When removing a tag, we shouldn't also remove it from the tag index.
2020-05-11 21:01:40 +03:00
Manos Pitsidianakis
a6af7fc0d3
listing.rs: don't create unnecessary operation
2020-05-11 21:01:40 +03:00
Manos Pitsidianakis
eb701695f7
Remove fnv crate
2020-05-10 21:18:56 +03:00
Manos Pitsidianakis
3ea1ce5454
errors: add `source` field to MeliError
2020-05-09 14:32:30 +03:00
Manos Pitsidianakis
d405aa9797
Show last worker thread heartbeat on status page
2020-05-08 11:07:10 +03:00
Manos Pitsidianakis
c8391983ee
Refactor OfflineListing
...
Move offline status drawing to OfflineListing
2020-05-08 11:00:45 +03:00
Manos Pitsidianakis
18dcf15e1e
Add open_mailbox shortcut for sidebar
2020-04-05 21:35:36 +03:00
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
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
3d7b9ff7cb
Move Query to melib
2020-04-05 15:57:05 +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
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
a8c1016f37
Add various logic checks
2020-03-12 09:47:39 +02:00
Manos Pitsidianakis
84d7e4c034
Small documentation fixes
2020-03-04 14:11:00 +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
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
63467a3c45
Check ComponentId equality on Composer::kill()
2020-02-28 09:18:31 +02:00
Manos Pitsidianakis
670485e8c7
compose: clear bounds of compose area properly
2020-02-28 09:15:11 +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
bae083cc8f
Rename Filter action to search
2020-02-26 18:36:52 +02:00
Manos Pitsidianakis
760c1e859d
Add search shortcut to shortcut map
2020-02-26 16:23:02 +02:00
Manos Pitsidianakis
33c1bf6558
Add consume newlines flag to phrase()
2020-02-26 15:53:46 +02:00
Manos Pitsidianakis
ac71d627f1
Implement search for CellBuffer
2020-02-26 12:25:57 +02:00
Manos Pitsidianakis
4ac52d9d5b
Replace every use of Folder with Mailbox
...
Use Mailbox for consistency.
2020-02-26 10:54:10 +02:00
Manos Pitsidianakis
1245eae0be
Add Knuth–Morris–Pratt to pager
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
45c0160cb6
Fix ThreadListing
...
ThreadListing was broken after the ThreadGroup introduction
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
68007a0842
View decoded email source by default
...
Toggle between decoded/raw source with view_raw_source shortcut, default
M-r
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
44da24fc96
Add left/right cursor mvments to execute bar
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
c4c11e4abc
Make Selector widget accept FnOnce
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
a806571322
Add UIDialog and UIConfirmationDialog widgets
...
They are just typedefs for the Selector widget. The API is kind of
messed up and this commit is part of the process of cleaning it up:
right now to use this, you check the is_done() method which if returns
true, the done() method executes the closure you defined when creating
the widget. The closure returns a UIEvent which you can forward
application-wide by context.replies.push_back(event) or handle it in
process_event() immediately.
2020-02-19 16:57:37 +02:00
Manos Pitsidianakis
e22ab2b424
ui: fix shortcuts map title not showing up on resize
2020-02-15 17:21:45 +02:00
Manos Pitsidianakis
b6efb14824
melib: remove Mailbox
...
Refactor Collection from melib to hold what folders have what envelopes.
Frontend accounts will now have a FolderEntry for each logical folder
and will unify many Account fields into one and eliminate a lot of
duplicate/dead code.
2020-02-10 02:11:07 +02:00
Manos Pitsidianakis
aab6b02db2
ui: clear selection with Esc
2020-02-10 00:10:19 +02:00
Manos Pitsidianakis
4090eecd04
ui: Consume Esc input events only when necessary
2020-02-09 23:32:14 +02:00
Manos Pitsidianakis
14b0ef8f37
Respect use_color conf value as well as NO_COLOR
2020-02-09 20:47:36 +02:00
Manos Pitsidianakis
c22a141b14
ui/themes: expand theme coverage to status panel and contacts
2020-02-09 00:30:50 +02:00
Manos Pitsidianakis
22fb0c0844
ui: handle ViewMailbox in listing.rs
...
handling viewmailbox inside a listing instead of their parent/manager
component is a leftover from before they even had a parent/manager.
2020-02-08 23:56:08 +02:00
Manos Pitsidianakis
647cb10b33
ui: Use FolderHash instead of usize for folder cursor
...
Use FolderHash directly as a cursor type for folders within an account
isntead of having a usize (being the order of the folder within the
account) and figuring out the folder_hash everytime it's needed.
Add OfflineListing for offline accounts and AccountStatusChange event.
2020-02-08 23:56:08 +02:00
Manos Pitsidianakis
eef007600b
ui: improve theming coverage
2020-02-08 23:56:08 +02:00
Manos Pitsidianakis
9b7875c023
ui: change Component::get_status return type
...
There was no reason to return Option<String>, just return String::new()
instead of Option::None
2020-02-08 23:56:08 +02:00
Manos Pitsidianakis
50bfed7247
ui: fix subtraction overflow
2020-02-08 23:55:47 +02:00
Manos Pitsidianakis
eb501b6d50
ui: add ThemeAttribute argument to clear_area()
...
clear_area() sets the cleared cell attributes according to the new
argument.
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis
333db9ed37
ui: remove notifications from StatusBar
...
It's bad UX, they aren't very visible.
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis
f131e01bfc
Fix drawing getting stuck in empty terminal
...
Fix drawing getting stuck in loops when terminal is too small by
checking for it.
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis
4301fa3b04
ui: Change ascii branch drawings in attachment tree
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis
144eb62b76
ui: force refresh_mailbox etc on Mailbox{Delete,Create}
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis
f5e694cf5a
Make small cosmetic fixes
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis
05b91f1c02
Remove text_processing
...
Unwrap text_processing into melib
In preparation for uploading meli as a separate crate on crates.io.
2020-02-04 17:29:55 +02:00
Manos Pitsidianakis
8b6ea8de9a
Remove ui crate
...
Merge ui crate with root crate.
In preparation for uploading `meli` as a separate crate on crates.io.
Workspace crates will need to be published as well and having a separate
`ui` crate and binary perhaps doesn't make sense anymore.
2020-02-04 17:29:55 +02:00