Manos Pitsidianakis
5e67bc4d11
Rename `mime_apps` dependency to `xdg-utils`
...
Upstream's name was changed.
2020-02-04 02:58:24 +02:00
Manos Pitsidianakis
af4c5792b3
ui: remove unnecessary unreachable panics in set_and_join_box
2020-02-04 02:58:24 +02:00
Manos Pitsidianakis
901cc3494f
ui/themes: add theming support in tab bar
2020-01-31 03:54:58 +02:00
Manos Pitsidianakis
6a7cae0988
ui/themes: add NO_COLOR support
...
https://no-color.org/
2020-01-27 20:17:46 +02:00
Manos Pitsidianakis
f15e569627
ui/themes: add status.{bar,notification} and theme_default keys
...
- theme_default replaces general for all default colors/attributes
- add status.{bar,notification} support
2020-01-27 17:35:13 +02:00
Manos Pitsidianakis
5dc477bcd5
Fix some unused etc warnings
2020-01-27 17:32:12 +02:00
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
2020-01-27 17:15:29 +02:00
Manos Pitsidianakis
1e2b3c073d
ui/themes: add ThemeAttribute
...
Consolidate {fg,bg} color theme settings to ThemeAttribute and add Attr
(bold, etc).
2020-01-23 19:52:54 +02:00
Manos Pitsidianakis
aa04ddda3d
ui/themes: add envelope view headers/body theme colors
2020-01-22 00:05:26 +02:00
Manos Pitsidianakis
a1c449e585
ui/themes: add theming to ConversationsListing, sidebar
2020-01-21 12:02:21 +02:00
Manos Pitsidianakis
a9842cacee
ui: add theming support
...
Configuration flag "terminal.themes" has two default theme entries,
"dark" and "light".
This commit alters only CompactListing for theme support.
2020-01-21 12:02:21 +02:00
Manos Pitsidianakis
63ff25b36a
ui/listings: add folder_hash field
...
No reason not to have it stored and discover it whenever it's needed.
2020-01-20 16:03:29 +02:00
Manos Pitsidianakis
e07b5faf6e
melib/threads: already-exists check in threads insert
2020-01-20 16:03:29 +02:00
Manos Pitsidianakis
350fafb515
melib/thread: add attachments field to Thread
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis
5e68d600b9
melib/threads: Split ThreadGroup::Group to Thread
...
Create Thread struct.
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis
d9269335a1
melib/threads: rename thread hashes
...
- Rename ThreadHash to ThreadNodeHash
- Rename ThreadGroupHash to ThreadHash
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis
47a69f8eb9
melib: add ThreadGroup
...
Instead of using Union/Find to gather mail that belongs in the same
e-mail thread together, add a new entity ThreadGroup that ThreadNodes
point to. ThreadGroup represents an actual Thread: A thread root
ThreadGroup::Group or a reply ThreadGroup::Node.
To make semantics more accurate:
- ThreadNode hash should be renamed to ThreadNodeHash
- ThreadGroupHash should be renamed to ThreadHash
- ThreadGroup::Group should be a struct named Thread instead
- move ThreadGroup::Node logic to ThreadNode akin to Union/Find
- rename ThreaddGroup::Group to Thread
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis
20f86f2741
ui/listing: add mailbox reload rate limit
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis
0ac10aa4d0
Some listing refactoring
2020-01-20 16:03:06 +02:00
Manos Pitsidianakis
86d8419ce7
ui: add manual_refresh, refresh_command settings
...
manual_refresh Ar boolean
(optional) if true, do not monitor account for changes (shortcut listing.refresh)
refresh_command Ar String
(optional) command to execute when manually refreshing (shortcut listing.refresh)
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis
a365a846b8
Replace StackVec with smallvec::SmallVec
...
SmallVec has a less buggy and better implementation.
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis
b6403f486b
ui: Remove RefreshMailbox event
...
Leftover from older versions, it wasn't used anywhere
2020-01-07 12:56:28 +02:00
Manos Pitsidianakis
ca7d72e732
melib: Replace String with Cow<'static, str>
2020-01-07 12:55:27 +02:00
Manos Pitsidianakis
c0ac643f05
melib: add datetime module
...
Datetime module adds POSIX time functions interface
2020-01-06 16:10:36 +02:00
Manos Pitsidianakis
8694278369
ui: add auto_choose_multipart_alternative
...
Choose text/html by default if text/plain is empty in
multipart/alternative attachments
This happens in some newsletters I've come upon
2020-01-02 00:08:21 +02:00
Manos Pitsidianakis
b964a6a033
Plugins WIP #2
2019-12-27 17:57:48 +02:00
Manos Pitsidianakis
8de5a9412d
ui/compose: small panic fix
...
if user (Esc)apes from the send dialog the selector widget will not
return any values
2019-12-20 00:39:04 +02:00
Manos Pitsidianakis
0739f80f4b
ui/MailView: print attachment tree instead of list
2019-12-18 15:46:21 +02:00
Manos Pitsidianakis
9211913405
meli/backends: honor mailbox subscriptions in IMAP/JMAP
2019-12-18 15:44:44 +02:00
Manos Pitsidianakis
2b6f6ab42c
melib: Add BackendFolder methods, move special usage logic to backend
...
- add count() method to return (unseen, total) counts
- add is_subscribed()
- add set_special_usage() and set_is_subscribed()
concerns #8
2019-12-18 08:58:49 +02:00
Manos Pitsidianakis
8f63572584
Small refactors to avoid implicit unwrap() panics
2019-12-15 19:47:42 +02:00
Manos Pitsidianakis
0201241786
melib/backends: MailBackend::refresh() returns Result
...
Handle cases were refresh() would fail properly. Fixes a crash reported in #13
2019-12-15 08:55:08 +02:00
Manos Pitsidianakis
65efb23f14
melib/MailBackend: add refresh() method
...
Initiate refresh manually.
2019-12-14 18:58:59 +02:00
Manos Pitsidianakis
10368612ab
ui/listing: prevent spinning on is_online check
...
Since self.component is never drawn if account is not online, it will
remain dirty and everything will be redrawn again and again, blocking
the UI.
2019-12-14 18:57:58 +02:00
Manos Pitsidianakis
ab3e01359a
ui/Component: change set_dirty() to set_dirty(value)
...
Next commit will need to set a child component as not dirty so we need
set_dirty(value) instead of set_dirty() that always sets is to true.
2019-12-14 18:57:58 +02:00
Manos Pitsidianakis
2e38ea11e2
melib: make MailBackend::is_online() return Result<()>
...
Return Result<()> instead of bool to indicate connection status in order
to be able to show errors to user.
2019-12-14 18:57:52 +02:00
Manos Pitsidianakis
18a8d22b85
ui/shortcuts: Replace arrow key use with configurable shortcuts
2019-12-14 14:16:12 +02:00
Manos Pitsidianakis
328b17a995
ui/CompactListing: use Segment Trees to calculate max page column width
...
Given a range of entries that occupy a page (eg [0, 50] for a page of 50
rows high) get the max entry width for this column by using maximum
range queries with segment trees.
2019-12-12 11:11:32 +02:00
Manos Pitsidianakis
7432be5aaa
ui/listings: truncate subject at 150 grapheme width
...
Large subjects would cause large CellBuffer allocations.
2019-12-12 11:07:54 +02:00
Manos Pitsidianakis
b401b64f35
ui/CellBuffer: change row_iter() bounds to Range
...
Writing a range x..y is more ergonomic than (x, y+ 1)
2019-12-12 11:04:14 +02:00
Manos Pitsidianakis
b93154a596
ui/MailListings: fix set_seen action not being processed
2019-12-11 01:58:35 +02:00
Manos Pitsidianakis
f05a4205f7
melib/ui: small fixes
...
- melib/imap: accept quoted strings with escaped quotes in
protocol_parser
- ui/accounts: return unavailabity correctly if folder's worker slot is
empty instead of judging only by its vacancy
- ui/MailView: set view as not dirty if envelope loading from backend
fails so that it stops requesting it in every subsequent redraw
2019-12-11 00:17:11 +02:00
Manos Pitsidianakis
6f76cd9acc
melib: add special_usage() method to BackendFolder
...
Eventually after loading potential usage values from configuration,
backends will be able to change the usage values themselves. IMAP and
JMAP have the ability to set Mailbox roles (IMAP needs LIST-SPECIAL
extension
2019-12-11 00:15:36 +02:00
Manos Pitsidianakis
0eaf17871a
melib: add set_tags command in BackendOp
2019-12-08 11:25:54 +02:00
Manos Pitsidianakis
f632bc4c08
ui: update rows on TagAdd/TagRemove
...
Except for threadlisting
2019-12-07 20:47:59 +02:00
Manos Pitsidianakis
c6f1fa9be0
ui: Add TagAction
...
Add/Remove
2019-12-07 17:31:49 +02:00
Manos Pitsidianakis
fdb42cfc0c
ui/status: show tag and search backend info
...
Show tag and search backend info for each account.
2019-12-07 17:17:08 +02:00
Manos Pitsidianakis
e5da10093d
ui/listing: use MailListingTrait instead of ListingTrait
2019-12-07 17:17:05 +02:00
Manos Pitsidianakis
8e27b86453
Add MailListingTrait
...
Inheriting ListingTrait
2019-12-07 17:16:00 +02:00
Manos Pitsidianakis
6cf73b4238
Remove Option<EnvelopeHash> from ListingTrait
...
It was never used.
2019-12-07 01:38:43 +02:00