Commit Graph

42 Commits (94433cfc40de385978092e693140ecd65fb23afe)

Author SHA1 Message Date
Manos Pitsidianakis 94433cfc40
melib/backends: cleanup MailBackend trait definition 4 years ago
Manos Pitsidianakis 3eadaba34e
Replace old pseudo-async code with blocking rust async 4 years ago
Manos Pitsidianakis a190805384
melib/backends: Add BackendEvent enum 4 years ago
Manos Pitsidianakis 8a6bf3b217
Preserve Account order from configuration file
Use IndexMap to preserve the order of accounts in the UI from the
account definitions.
4 years ago
Manos Pitsidianakis b5530860d2
conf/DotAddressable: impls for more types 4 years ago
Manos Pitsidianakis 7fd511e149
conf/shortcuts.rs: implement DotAddressable for Shortcuts 4 years ago
Manos Pitsidianakis 3f8aa560f0
melib/MailBackend: add MailBackendCapabilities struct 4 years ago
Manos Pitsidianakis 44ffbe54e2
input_thread: add atomic refcount to check if thread is dead 4 years ago
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.
4 years ago
Manos Pitsidianakis 0d3fe288c5
sqlite3: make reindex operation async 4 years ago
Manos Pitsidianakis 3a16dc6522
Show account online error status when offline 4 years ago
Manos Pitsidianakis 89dedbedb7
imap: launch async watch when connection comes online
Closes #38 Make async watch/refresh work in imap
4 years ago
Manos Pitsidianakis b5748c247a
MailBackend: remove connect() method 4 years ago
Manos Pitsidianakis a7e177586a
Fix clippy lints 4 years ago
Manos Pitsidianakis 4721073bc3
Rename jobs1 to jobs 4 years ago
Manos Pitsidianakis a38764f490
Add somewhat-working async IMAP backend 4 years ago
Manos Pitsidianakis 4f3a98f90a
Add job executor 4 years ago
Manos Pitsidianakis e97cf98b3b
Add `view` subcommand
Add subcommand to view standalone e-mail files in meli's pager without
instantiating any accounts.
4 years ago
Manos Pitsidianakis 9f30cd6bbc
state.rs: send AccountStatusChange 4 years ago
Manos Pitsidianakis f3d5edfe14
Add copy/move to other account operations 4 years ago
Manos Pitsidianakis 6458ccb860
meli: update nom dependency to 5.1.1 4 years ago
Manos Pitsidianakis b8261ee36a
Overhaul input thread
Remove raw/non raw distinction.

Use a pipe for input thread commands and poll stdin/pipe for events
4 years ago
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.
4 years ago
Manos Pitsidianakis eb701695f7
Remove fnv crate 4 years ago
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
4 years ago
Manos Pitsidianakis 651dda67cf
Respect autoload mailbox setting 4 years ago
Manos Pitsidianakis 9d20fd5576
Save forked processes for reaping 4 years ago
Manos Pitsidianakis a94bb1e27a
Show float notification on refresh cmd 4 years ago
Manos Pitsidianakis 7b631beb0a
Don't panic in WorkController::drop 4 years ago
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.
4 years ago
Manos Pitsidianakis 7807f565ec
Clear input thread channel on restore()
The channel may contain Kill commands that will cause the new thread to
exit immediately.
4 years ago
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
4 years ago
Manos Pitsidianakis c4c11e4abc
Make Selector widget accept FnOnce 4 years ago
Manos Pitsidianakis e3abd458ce
Add ui_dialogs in State 4 years ago
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.
4 years ago
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.
4 years ago
Manos Pitsidianakis 14b0ef8f37
Respect use_color conf value as well as NO_COLOR 4 years ago
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.
4 years ago
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('>')
4 years ago
Manos Pitsidianakis 4a4c8e265a
ui: add overlay grid
Add second layer grid for overlays (messages, notifications)
4 years ago
Manos Pitsidianakis f208948651
melib: add mailbox delete/create to IMAP 4 years ago
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.
4 years ago