Commit Graph

38 Commits (e8a98f87e39dff8825ebbf9166c6203238d27dad)

Author SHA1 Message Date
Manos Pitsidianakis b5530860d2
conf/DotAddressable: impls for more types 2020-07-26 16:09:35 +03:00
Manos Pitsidianakis 7fd511e149
conf/shortcuts.rs: implement DotAddressable for Shortcuts 2020-07-26 15:38:11 +03:00
Manos Pitsidianakis 3f8aa560f0
melib/MailBackend: add MailBackendCapabilities struct 2020-07-25 17:53:04 +03:00
Manos Pitsidianakis 44ffbe54e2
input_thread: add atomic refcount to check if thread is dead 2020-07-23 13:23:23 +03:00
Manos Pitsidianakis 996abd323f
Add print setting action
Add experimental print setting action. The command is of the form:

  print account_name listing.index_style

account_name is currently ignored.

The path, e.g. listing.index_style is split by "." and fed to
DotAddressable lookup trait method. The method checks the first segment
in the path if it matches any of the struct's fields, and then calls the
field's lookup method.
2020-07-17 13:33:40 +03:00
Manos Pitsidianakis 0d3fe288c5
sqlite3: make reindex operation async 2020-07-17 00:02:14 +03:00
Manos Pitsidianakis 3a16dc6522
Show account online error status when offline 2020-07-08 12:10:14 +03:00
Manos Pitsidianakis 89dedbedb7
imap: launch async watch when connection comes online
Closes #38 Make async watch/refresh work in imap
2020-07-06 15:27:08 +03:00
Manos Pitsidianakis b5748c247a
MailBackend: remove connect() method 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis a7e177586a
Fix clippy lints 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis 4721073bc3
Rename jobs1 to jobs 2020-07-06 15:26:39 +03:00
Manos Pitsidianakis a38764f490
Add somewhat-working async IMAP backend 2020-07-06 15:12:05 +03:00
Manos Pitsidianakis 4f3a98f90a
Add job executor 2020-07-06 15:07:44 +03:00
Manos Pitsidianakis e97cf98b3b
Add `view` subcommand
Add subcommand to view standalone e-mail files in meli's pager without
instantiating any accounts.
2020-06-10 18:07:56 +03:00
Manos Pitsidianakis 9f30cd6bbc
state.rs: send AccountStatusChange 2020-06-09 15:39:53 +03:00
Manos Pitsidianakis f3d5edfe14
Add copy/move to other account operations 2020-06-08 22:11:43 +03:00
Manos Pitsidianakis 6458ccb860
meli: update nom dependency to 5.1.1 2020-06-06 23:22:26 +03:00
Manos Pitsidianakis b8261ee36a
Overhaul input thread
Remove raw/non raw distinction.

Use a pipe for input thread commands and poll stdin/pipe for events
2020-05-29 15:43:05 +03:00
Manos Pitsidianakis 8648b229ad
Add AccountHash to RefreshEvent
Different accounts might have same inboxes with same MailboxHashes. Use
the hash of the account's name to differentiate.
2020-05-10 22:10:17 +03:00
Manos Pitsidianakis eb701695f7
Remove fnv crate 2020-05-10 21:18:56 +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 651dda67cf
Respect autoload mailbox setting 2020-03-02 12:06:19 +02:00
Manos Pitsidianakis 9d20fd5576
Save forked processes for reaping 2020-03-01 17:56:58 +02:00
Manos Pitsidianakis a94bb1e27a
Show float notification on refresh cmd 2020-02-28 09:16:19 +02:00
Manos Pitsidianakis 7b631beb0a
Don't panic in WorkController::drop 2020-02-28 09:12:36 +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 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
2020-02-26 10:54:10 +02:00
Manos Pitsidianakis c4c11e4abc
Make Selector widget accept FnOnce 2020-02-25 22:15:13 +02:00
Manos Pitsidianakis e3abd458ce
Add ui_dialogs in State 2020-02-19 17:01: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 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 14b0ef8f37
Respect use_color conf value as well as NO_COLOR 2020-02-09 20:47:36 +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 3bca6d1d9c
ui: add floating notifications within terminal
`DisplayMessage` messages are for user input responses (eg errors for
user actions). They now appear as floating boxes in the bottom right
corner of the UI and can be browsed with Alt('<') and Alt('>')
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis 4a4c8e265a
ui: add overlay grid
Add second layer grid for overlays (messages, notifications)
2020-02-08 23:54:15 +02:00
Manos Pitsidianakis f208948651
melib: add mailbox delete/create to IMAP 2020-02-08 23:54:14 +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