Commit Graph

841 Commits

Author SHA1 Message Date
Manos Pitsidianakis
3a3b815b3a
ui/accounts: add save_special method for mail
Add save_special method in Accounts. save_special() saves mail to the
first folder_type (eg Draft, Sent, Inbox) folder it finds or to any
other as fall over.
2019-12-03 13:30:42 +02:00
Manos Pitsidianakis
a059e4ad4c
melib: add summary field to MeliError 2019-12-03 13:30:42 +02:00
Manos Pitsidianakis
7010ee7495
melib/mbox: send Finished in Mbox get 2019-12-03 13:30:42 +02:00
Manos Pitsidianakis
ef26b03bb6
Add some documentation 2019-12-01 17:13:36 +02:00
Manos Pitsidianakis
16ccff0f44
ui: add RowIterator and BoundsIterator for CellBuffer
Use `RowIterator` to iterate the cells of a row without the need to do
any bounds checking; the iterator will simply return `None` when it
reaches the end of the row.  `RowIterator` can be created via the
`CellBuffer::row_iter` method and can be returned by `BoundsIterator`
which iterates each row.
2019-12-01 17:13:36 +02:00
Manos Pitsidianakis
3ae43817a1
ui: user-configured colors for tags in mail listings 2019-12-01 12:10:31 +02:00
Manos Pitsidianakis
bca33370cc
Add tag settings in UI config module 2019-12-01 12:09:35 +02:00
Manos Pitsidianakis
19a268b8a7
ui: add tags in compact, conversations 2019-11-30 21:55:40 +02:00
Manos Pitsidianakis
d31c629ac4
ui: add tags in plain listing 2019-11-30 17:44:54 +02:00
Manos Pitsidianakis
6d380cefd1
ui: add keep_{f,b}g flags in Cell
It might be necessary to know if a cell has to keep its colours while
the character content doesn't change. For example the tags in a mail
listing can have colour backgrounds that should be immutable if the user
highlights each entry.

The flags should be reset every time the cell itself is reset.
2019-11-30 17:44:54 +02:00
Manos Pitsidianakis
b54bd6de84
ui: pass search to libnotmuch for notmuch accounts 2019-11-30 17:39:12 +02:00
Manos Pitsidianakis
258b6c8fe8
melib: add tags() method in MailBackend
Add tags() method that returns Option<Arc<RwLock<BTreeMap<u64, String>>>>.

The BTreeMap holds available tags in a mail backend and uses the tag's
hash as key.

The method returns an Option because not all backends may support
tagging.
2019-11-30 17:37:00 +02:00
Manos Pitsidianakis
49dccb94a5
bin: add notmuch feature
Add notmuch feature that includes melib/notmuch_backend and a new
feature for the ui crate. We need the latter in order to know from
within ui if we have been linked with libnotmuch
2019-11-30 17:31:49 +02:00
Manos Pitsidianakis
6653357d54
melib/notmuch: fix compilation errors 2019-11-30 01:12:14 +02:00
Manos Pitsidianakis
0b845a0d16
Small fixes
- Update documentation on include config syntax
- Accept relative paths in include config syntax
- Fix one line clearing that shouldn't be redrawn in html view
- Fix shortcuts not being honored in Composer
2019-11-29 12:15:05 +02:00
Manos Pitsidianakis
d4f20b0c0d
Fix Raw envelope view starting one line line earlier 2019-11-28 22:32:13 +02:00
Manos Pitsidianakis
c04513ac94
ui: add shortcut! macro to compare shortcuts values
This is used in process_event() functions of UI Components. When a key
has been input we have to compare it with the configured shortcuts from
a hashmap.

Add shortcut! macro that checks shortcut hashmaps for the given name and
doesn't panic if it's missing.
2019-11-28 22:16:56 +02:00
Manos Pitsidianakis
bb486ca9d8
melib: Remove quotes from addresses in email/parser.rs 2019-11-28 22:15:32 +02:00
Manos Pitsidianakis
3dfb2f4f2c
melib: fix out-of-bounds parser bug 2019-11-28 18:52:12 +02:00
Manos Pitsidianakis
4048eab424
ui/conf: Add include file feature
Use

  #include "path/to/file"

In configuration file to include other files.
2019-11-27 22:21:25 +02:00
Manos Pitsidianakis
15348fb245
meli.1: add contacts doc 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
8a17eee769
ui/compose: don't save sent mail with Draft flag 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
58209d6f6b
Replace some panics with errors 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
ba52c59859
bin: add backend specific validation functions for --test-config flag 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
4677f9c6bb
melib/imap: initialise uid_store folders in folders() 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
81b7195080
ui: add Ctrl-* Alt-* and F1..F12 parsers and tests 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
2199726b2c
Retidy shortcuts 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
afff63c781
ui: load vcards to addressbook with vcard_folder account setting 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
689327651f
melib/vcard: add parser for vcard files 2019-11-27 01:46:23 +02:00
Manos Pitsidianakis
9a516e0663
ui/text_editing: add Ctrl-{f,b,u} readline shortcuts 2019-11-27 01:46:23 +02:00
Manos Pitsidianakis
3dc0cb1963
imap: send 'finished' signal when watch thread dies 2019-11-25 12:04:27 +02:00
Manos Pitsidianakis
436945dabe
Doc: update meli.conf.5 on headers_sticky and pager_context 2019-11-24 20:47:05 +02:00
Manos Pitsidianakis
02aa666845
Doc: add glob for subscribed_folders field info 2019-11-24 20:44:24 +02:00
Manos Pitsidianakis
1df7a35f0f
ui: CellBuffer cleanups
- Remove unused Traits etc
- Make scrolling a method
2019-11-24 20:42:26 +02:00
Manos Pitsidianakis
e5f5febd6b
Log notification script failures 2019-11-24 20:39:57 +02:00
Manos Pitsidianakis
db197aaffe
ui/MailView: implement headers_sticky option
Kind of hacky, I don't like the way it is done but I'm willing to
compromise.
2019-11-24 20:38:30 +02:00
Manos Pitsidianakis
af365fa8d4
Set 600 perm mode to all created files
When creating a data file, set permissions to read/write for the user.
2019-11-24 17:00:55 +02:00
Manos Pitsidianakis
3e33335914
ui/MailView: unwrap Pager out of option
There's no need anymore for pager to be inside an Option.
2019-11-23 21:57:17 +02:00
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.
2019-11-23 19:34:16 +02:00
Manos Pitsidianakis
12e4258ae4
conf: add * glob expansion to subscribed_folders field
You can now do:
 subscribed_folders = [ "*", ]
2019-11-23 19:34:16 +02:00
Manos Pitsidianakis
b327bee3e4
text_processing: add GlobMatch trait
Move GlobMatch trait from ui::mailcap to text_processing in order to use
it for glob matching folder paths in subscribed_folders field of
account configuration. See next commit.
2019-11-23 19:34:16 +02:00
Manos Pitsidianakis
eecec551c1
Display watch thread errors to user
Show a proper notification with the error message to the user instead of
just logging it on debug-tracing.
2019-11-23 19:34:16 +02:00
Manos Pitsidianakis
b8e4a35963
melib/imap: add default capabilities to SUPPORTED_CAPABILITIES 2019-11-23 19:34:16 +02:00
Manos Pitsidianakis
41a678c6ef
melib: make MailBackend::folders return Result
Change folders() signature:
-    fn folders(&self) -> FnvHashMap<FolderHash, Folder>;
+    fn folders(&self) -> Result<FnvHashMap<FolderHash, Folder>>;

Imap may not be online, therefore we need the ability to return an
error.
2019-11-23 17:47:24 +02:00
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.
2019-11-22 18:43:24 +02:00
Manos Pitsidianakis
1063bb73b5
shortcuts tidiness
- Unflatten shortcuts configuration table.
  Shortcuts now have to be defined in levels:
  [shortcuts.general]
  ...
  [shortcuts.pager]
  ...

- Add shortcuts for thread view
- Sort alphabetically in help view
2019-11-22 16:34:35 +02:00
Manos Pitsidianakis
678889d706
ui/threadview: add show_thread shortcut
Press 't' by default to toggle thread visibility
2019-11-22 16:22:52 +02:00
Manos Pitsidianakis
f3c938d8c3
Prevent OOM abort when printing large strings 2019-11-22 14:17:09 +02:00
Manos Pitsidianakis
424b244bb7
fixup some TODO and FIXMEs 2019-11-22 13:59:00 +02:00
Manos Pitsidianakis
501f1a0e1e
pager: add minimum_width and split_lines_reflow
Add options to pager settings
2019-11-22 13:13:27 +02:00