Commit Graph

238 Commits (b4dfc1f89d8f832b6d70ec0e640e7aa763adbd29)

Author SHA1 Message Date
Manos Pitsidianakis eef007600b
ui: improve theming coverage 4 years ago
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
4 years ago
Manos Pitsidianakis cadb1e1613
ui/conf: expand include() paths in config
Expand variables and `~` in included paths in user configuration.
4 years ago
Manos Pitsidianakis 0b4109dfdb
ui: fix wrong subscription status in folders
Subscription status was checked/modified in various places, whereas now
the universal truth is the `BackendFolder::is_subscribed()` method set
by the backend when a folder is created. The `Account` struct passes a
closure to the backend constructor that determines whether the folder is subscribed or not according to the user configuration.

- If subscribed_folders field is empty, then all folders are subscribed.
- OR check explicit folder configuration
- OR check if folder path matches to a glob in subscribed_folders.
4 years ago
Manos Pitsidianakis 50bfed7247
ui: fix subtraction overflow 4 years ago
Manos Pitsidianakis eb501b6d50
ui: add ThemeAttribute argument to clear_area()
clear_area() sets the cleared cell attributes according to the new
argument.
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 333db9ed37
ui: remove notifications from StatusBar
It's bad UX, they aren't very visible.
4 years ago
Manos Pitsidianakis d6e3c51b07
ui: move box drawing to src/terminal
No logical reason for it not to be in the terminal module anymore (the
set_and_join* functions predate the terminal module which is why they
weren't there to begin with).
4 years ago
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.
4 years ago
Manos Pitsidianakis 4301fa3b04
ui: Change ascii branch drawings in attachment tree 4 years ago
Manos Pitsidianakis af38b1306a
ui: use quoted_argument parser in Ex command arguments 4 years ago
Manos Pitsidianakis 144eb62b76
ui: force refresh_mailbox etc on Mailbox{Delete,Create} 4 years ago
Manos Pitsidianakis f5e694cf5a
Make small cosmetic fixes 4 years ago
Manos Pitsidianakis f208948651
melib: add mailbox delete/create to IMAP 4 years ago
Manos Pitsidianakis d6f04c9ed3
Fix IntoIterator warning 4 years ago
Manos Pitsidianakis 05b91f1c02
Remove text_processing
Unwrap text_processing into melib

In preparation for uploading meli as a separate crate on crates.io.
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
Manos Pitsidianakis 6fcc792b83
Remove src/python
In preparation for publishing meli as a separate crate on crates.io.

src/python was never used for anything, so remove it.
4 years ago
Manos Pitsidianakis dbc0fd81af
Rename config file to config.toml 4 years ago
Manos Pitsidianakis b823969ae2
small fixes
- Don't debug print Timer events in src/bin.rs event loop; they're too
frequent and pollute the logs
- chain set_{fg,bg,..} method calls for &mut Cell
- remove unneeded u8 to u8 cast
4 years ago
Manos Pitsidianakis 8ec82b836a
Add 2 theme-related cli flags 5 years ago
Manos Pitsidianakis f58ed387dd
ui: add ratelimiting in UI notifications and drawing 5 years ago
Manos Pitsidianakis 5e912db461
Send timer ID as si_value to SIGALRM handler
Associate each alarm signal with the timer of its origin.
5 years ago
Manos Pitsidianakis a365a846b8
Replace StackVec with smallvec::SmallVec
SmallVec has a less buggy and better implementation.
5 years ago
Manos Pitsidianakis beeea9a0c1
ui: implement PosixTimer
Add interface for posix timers timer_create(2) time(7)
5 years ago
Manos Pitsidianakis 17a0f31b3e
ui/accounts: split StartupCheck event semantics
UIEvent::StartupCheck was meant to notify the UI that a folder had made
progress and polling its async worker would return a
Result<Vec<Envelope>>. However the StartupCheck was received by
MailListing components which called account.status() which did the
polling. That means that if the polling got back results, the listing
would have to call account.status() again to show them. This is a
problem in configurations with only one account because there aren't any
other sources of event to force the listing to recheck account.status()

A new event UIEvent::WorkerProgress will do the job of notifying an
Account to poll its workers and the account will send a startupcheck if
it has made progress. That way the refresh progress is as follows:

Worker thread sends WorkerProgress event -> State calls appropriate
account's account.status() method -> account polls workers, and if there
are new results send StartupCheck events -> State passes StartupCheck
events to components -> Listings update themselves when they receive the
event
5 years ago
Manos Pitsidianakis 59f7f03d64
ui: refactor watch thread spawning procedure
- Remove unnecessary parameters from watch(), reload()
- Add NewThread event that adds new threads in
work_controller.static_threads hashmap
- removed obsolete field State.threads
- silence watch thread error notifications
5 years ago
Manos Pitsidianakis ef26b03bb6
Add some documentation 5 years ago
Manos Pitsidianakis af365fa8d4
Set 600 perm mode to all created files
When creating a data file, set permissions to read/write for the user.
5 years ago
Manos Pitsidianakis 874a252394
ui: add periodic account connectivity check
1. spawn thread to send ThreadPulses to the main event loop that "parks" until unparked from State
2. State unparks thread if there are accounts that are offline
3. thread sends ThreadPulse and parks again
4. State checks accounts again and so on.
5 years ago
Manos Pitsidianakis 3d3ead02e9
bin: add --test-config flag
meli --test-config PATH tests a configuration file for syntax issues or missing options.

Caveat: right now undefined options/values do not return an error.
Backend specific options are also not validated.
5 years ago
Manos Pitsidianakis 0cea6368d9
ui/embed: fix scrolling area issues 5 years ago
Manos Pitsidianakis 321be8555f
Cleanup startup error exit paths
Make startup methods return Results so that the main binary can exit
cleanly instead of using std::process::exit from arbitrary positions,
which exits the process immediately and doesn't run destructors.
5 years ago
Manos Pitsidianakis 99da9a35b6
Add embed pty support
Emulate a terminal within meli. In the next commit it will be used to
embed an editor in the composing tab.

This is a non-complete xterm emulation that has some bugs.
5 years ago
Manos Pitsidianakis a9425be61e
ui/contacts: add side-menu, remove accounts tab
- Rename accounts tab to status tab
- add side menu to contacts tab to switch between accounts
5 years ago
Manos Pitsidianakis 212e9bd701
Revert "Show manuals with command line arguments"
Since this commit requires `mandoc` as a build dependency, it is removed
for now until a better compromise is found.

This reverts commit 6a8f869e5b.
5 years ago
Manos Pitsidianakis 6a8f869e5b
Show manuals with command line arguments
Add --manual, --conf-manual command line arguments that display manpages
through a pager. If no pager is found, this currently fails. It should
print the manuals to stdout instead.

The manuals are read from src/manuals and are generated with mandoc
whenever changes to the manpage sources meli.1 and meli.conf.5 are made.
5 years ago
Manos Pitsidianakis ee9ffffa12
bin: C-L issues manual redraw 5 years ago
Manos Pitsidianakis d44a68ec69
ui: don't quit if editing a draft
Ask user to save draft or discard it.
5 years ago
Manos Pitsidianakis b07db29a19
ui: add timer tick every 300ms
Check for pending events in the main process by receiving a timer event
every 300ms. This way loaded folders or received emails will get
recognized even if the appropriate informing signals got lost.
5 years ago
Manos Pitsidianakis f394fde143
add priority and info to jobs and workers
jobs now have a priority given to them, in order to parse some mailboxes
(eg INBOX, Sent) first.

worker threads now can set their names and status
5 years ago
Manos Pitsidianakis 81a55abc7c
Update crossbeam to 0.7.2 and remove chan 5 years ago
Matthias Beyer 6e716946b7
Reformat to be a proper rust comment
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
5 years ago
Manos Pitsidianakis 2a1bf37e69
Add --version command line flag 5 years ago
Manos Pitsidianakis df5559023d
add --help, --config, --create-config arguments 5 years ago
Manos Pitsidianakis 93f3d6e230
remove std::dbg uses 5 years ago
Manos Pitsidianakis fb406667ab
add debug! macro to replace eprintlns 5 years ago
Manos Pitsidianakis 69031e66f9
ui: move account menu functions to Listing
AccountMenu was completely semantically attached to Listing, so there's
no reason for them to be separate and communicating via events.
5 years ago
Manos Pitsidianakis 9bc76e3bcb
ui: unwrap UIEventType 5 years ago
Manos Pitsidianakis 106744c7ca
ui: remove Entity 5 years ago
Manos Pitsidianakis ee4462881e
run cargo fmt 5 years ago
Manos Pitsidianakis 1c7aa0ec9c
update to 2018 edition 5 years ago
Manos Pitsidianakis 551db51b00
ui: avoid full renders when worker threads return StartupChecks
Now listings only re-render when their folder gets a StartupCheck event,
account menu always re-renders to update new mail counts

closes #76
5 years ago
Manos Pitsidianakis 1867bb6aa3
ui: hide divider column in VSplit if !self.show_divider 5 years ago
Manos Pitsidianakis a2e81ed354
ui: enter EX mode with space 5 years ago
Manos Pitsidianakis bf038428c2
Run rustfmt 5 years ago
Manos Pitsidianakis 1bb1cf7aac
add notification filter
concerns #64
5 years ago
Manos Pitsidianakis 4ee5447cf9
Add FormWidget/ButtonWidget and use them in Contacts 5 years ago
Manos Pitsidianakis 62168e9183
Add contact view page, edit headers in compose, index style in conf 5 years ago
Manos Pitsidianakis 92bb3bf8d3
ui: add contacts and account panel 5 years ago
Manos Pitsidianakis 5a28320004
WIP 5 years ago
Manos Pitsidianakis fae1cdd33e
melib: Re-implement JWZ threading algorithm 5 years ago
Manos Pitsidianakis 4f715af248
melib: cache threads
closes #28
5 years ago
Manos Pitsidianakis bcef22b3f3
ui: add Listing component with 3 modes: compact plain and threaded 5 years ago
Manos Pitsidianakis 3e9d137310
melib: rework mail events
closes #39
5 years ago
Manos Pitsidianakis 8d3a2d8236
ui: refactor compose actions 5 years ago
Manos Pitsidianakis b94687cdb0
ui: add reply-context in compose
tracking-issue: #24
5 years ago
Manos Pitsidianakis 2b6d1e0dbf
Run clippy lints 5 years ago
Manos Pitsidianakis ad5d2353e8
Add plain threadview 5 years ago
Manos Pitsidianakis 710920c67b
Detect new mail events and pass them as notifications to State
concerns #26
5 years ago
Manos Pitsidianakis b2c7430907
Add compact view listing, and compose tab pager
concerns #3
5 years ago
Manos Pitsidianakis f033463db9
startupcheck signal seems to be causing redraws
closes #33
5 years ago
Manos Pitsidianakis 5889494e9e
Move backend logic to backend and keep Envelope abstract 5 years ago
Manos Pitsidianakis 1b44aae5ce
Add reload when receiving refresh event!! 5 years ago
Manos Pitsidianakis b98a04f35b
Make backend folders completely agnostic (remove maildir logic from
conf)
5 years ago
Manos Pitsidianakis 0c018dd544
Remove excess redraw in event loop 5 years ago
Manos Pitsidianakis a8fed3a042
Add Charset type and Charset based decoding 5 years ago
Manos Pitsidianakis f16fd889e4
Add deleting in ex mode 5 years ago
Manos Pitsidianakis c30f77a312
Run clippy and rustfmt 5 years ago
Manos Pitsidianakis 8a7dfcd4ee
Add some documentation 5 years ago
Manos Pitsidianakis 00200aedb6
Handle thread joins from State 5 years ago
Manos Pitsidianakis 3f35b69ff1
Poll all parse workers on startup 5 years ago
Manos Pitsidianakis b21d30c2ef
Async loading of mailboxes on startup 5 years ago
Manos Pitsidianakis 63ce729205
Optimize some parser stuff 5 years ago
Manos Pitsidianakis 2f91d29326
rustfmt everything 5 years ago
Manos Pitsidianakis b7729243ad
Fix compiler warnings 5 years ago
Manos Pitsidianakis 2df22c2da9
^Z causes SIGSTOP
closes #6
5 years ago
Manos Pitsidianakis bae613ec54
Remove eprintlns and add some doc 5 years ago
Manos Pitsidianakis bf0eb66b02
Add 'show_divider' field in (V|H)Split 5 years ago
Manos Pitsidianakis f267fe8c9e
Micro fixes 5 years ago
Manos Pitsidianakis 00235fe814
Add message composing and piping to msmtp
Closes #16
5 years ago
Manos Pitsidianakis b35407bc7f
Add child forking functionality 5 years ago
Manos Pitsidianakis 0092496632
Rename all getters from get_X to X
closes #5
5 years ago
Manos Pitsidianakis 8c98d3a5a0
Move ui and melib to different crates
closes #9
5 years ago
Manos Pitsidianakis 6dd247b371
Remove useless eprintlns 5 years ago
Manos Pitsidianakis 3a26ea9916
Fix cursor highlight bug on pager opening 5 years ago
Manos Pitsidianakis ab099b524a
Add more documentation. 5 years ago
Manos Pitsidianakis e95cc4c1e9
Add threaded view, notifications, pager filter 5 years ago
Manos Pitsidianakis 51813510b1
Spawn watch threads on account creation 5 years ago
Manos Pitsidianakis 2c5704dcd0
Add resize on SIGWINCH 5 years ago
Manos Pitsidianakis df5c617b2d
Move mailbox management to MailListing to avoid copying 5 years ago
Manos Pitsidianakis 13fe255459
Copy MailListing content from cache 5 years ago
Manos Pitsidianakis 16e0960cd5
Add NORMAL and EXECUTE modes 5 years ago
Manos Pitsidianakis dc348dde6d
Add indexes to account menu 5 years ago
Manos Pitsidianakis 5fcacc80b8
Moved accounts to State 5 years ago
Manos Pitsidianakis 11aac5ec34
Fix pager content drawing 5 years ago
Manos Pitsidianakis d089eb49dc
Add scrolling, only redraw dirty areas 5 years ago
Manos Pitsidianakis 8c7a0ae540
Index scrolling, dummy backends, and some pager settings 5 years ago
Manos Pitsidianakis b11eb1e494
Add sidebar menu 5 years ago
Manos Pitsidianakis c141496038
Add some doc 5 years ago
Manos Pitsidianakis ba8508b987
Remove ncurses, add termion 5 years ago
Manos Pitsidianakis dbda703bcb
Add tui as submodule 5 years ago
Manos Pitsidianakis cbd56b470e
Last commit for ncurses 5 years ago
Manos Pitsidianakis ac8e334ae9
Edit documentation 5 years ago
Manos Pitsidianakis f2899b63d2
Cleanup backend logic 5 years ago
Manos Pitsidianakis e503b0015a
Highlight unread emails differently in Index 5 years ago
Manos Pitsidianakis c5dbf4e9ae
Move all backends to Backends structure 5 years ago
Manos Pitsidianakis 577889f7da
Add watcher and input threads 5 years ago
Manos Pitsidianakis 5ed4c37e52
Add comments for missing Message-IDs 5 years ago
Manos Pitsidianakis 0c3938961e
Fix last header value bug 5 years ago
Manos Pitsidianakis 15affc60a2
add flag support
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis fb745be27f
rustfmt
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis cddea885f2
fix lints, rename types, add thread module
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis 655b5a6ea7
doco comments and various stuff
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis 2279476a2f
custom encoded word parser
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis a07f92a8a4
don't parse mail body until it's requested
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis 4119a4285d
add accounts and BackendOps
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis 8dfba2c51c
Fix quoted_printable_byte 5 years ago
Manos Pitsidianakis 01d0d70947
Use ascii eq_ignore_case 5 years ago
Manos Pitsidianakis d18e64df4c
parser.rs micro-optimisations 5 years ago
Manos Pitsidianakis d3b00d19ce
use fnv hash 5 years ago
Manos Pitsidianakis 04ff21a55f
various fixes
- Clippy fixes
- Rewrite header value parser
- Rewrite string allocations in header encodings
- Thread mail parsing for maildir.rs
- Split crate to lib and bin
5 years ago
Manos Pitsidianakis 63670259f8
Add attachment support 5 years ago
Manos Pitsidianakis 9946fbcbe0
threads 5 years ago
Manos Pitsidianakis 8e07843c4a
mailbox: add threads
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago
Manos Pitsidianakis 351c9d9a29
initial commit
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
5 years ago