Commit Graph

689 Commits (05d9ca6e0d10fc805c99e494d66bc9b7b5f0e319)

Author SHA1 Message Date
Manos Pitsidianakis 05d9ca6e0d
small fixes 2019-11-21 15:44:18 +02:00
Manos Pitsidianakis 022e1f437d
ui/pager: reflow on resize 2019-11-21 15:42:01 +02:00
Manos Pitsidianakis c62c04e1e7
text-processing: small fix 2019-11-21 15:39:56 +02:00
Manos Pitsidianakis 41d039992c
text-processing: add catch-all line splitting
By using Reflow::All, lines are split when overflowing the screen's
width, and start with a special symbol
2019-11-21 15:37:50 +02:00
Manos Pitsidianakis 3d52b1f1b7
ui: fix bracket mode end code typo
Thanks to Gert Hulselmans for noticing in 35c3017419
2019-11-19 23:41:12 +02:00
Manos Pitsidianakis 62bfe2a91f
ui: embed editor cleanups 2019-11-19 23:28:08 +02:00
Manos Pitsidianakis ce646abc7a
ui: add send confirmation dialog in compose tab
Confirm before sending mail
2019-11-19 23:28:08 +02:00
Manos Pitsidianakis 458f8da332
ui: fix bounds check in StatusBar 2019-11-19 20:40:28 +02:00
Manos Pitsidianakis 0cea6368d9
ui/embed: fix scrolling area issues 2019-11-19 20:39:43 +02:00
Manos Pitsidianakis f1588f6002
ui: shortcuts refactoring 2019-11-18 22:20:18 +02:00
Manos Pitsidianakis 8798d84e43
ui: update cached rows on row update in CompactListing 2019-11-18 20:55:52 +02:00
Manos Pitsidianakis 51628ac9d2
ui: move list_management mod to melib
list_management module includes some small functions to handle mailing
list metadata (List-* headers)
2019-11-18 20:37:48 +02:00
Manos Pitsidianakis 449a24d075
ui: ListActions changes
- Parse List-Post value like List-Unsubscribe: comma separated angle bracket limited list of <mailto:> or <url> values
- Check if List-Archive value is angle bracket delimited
2019-11-18 14:55:48 +02:00
Manos Pitsidianakis 590619de0e
ui/compose: remove thread view in reply composer
You don't need to have the thread in the composer anymore, since you can
just switch tabs to the actual thread.
2019-11-18 14:53:41 +02:00
Manos Pitsidianakis 31a86533c5
ui/pager: add Left/Right movements
Left/Right movements change the horizontal offset by (page width) / 3.
2019-11-18 14:50:08 +02:00
Manos Pitsidianakis 995e70e009
ui: change line_break meaning in write_string_to_grid
Change line_break parameter from bool flag (whether to break in the end
of a line or not) to an Option<usize>, where the value is the x_offset
of the left side of the area. Thus if line_break == Some(_) when a line
ends its value is set as x to continue in the next line properly.
2019-11-18 14:49:50 +02:00
Manos Pitsidianakis fc2d9a684d
melib/imap: set has_attachments based on BODYSTRUCTURE
fetch BODYSTRUCTURE along with ENVELOPE from server and set
has_attachments based on the MIME structure of the envelope.

Notes: BODYSTRUCTURE returns the MIME structure of the envelope without
the data, so if it includes a multipart/mixed it *should* have
ENVELOPE returns basic headers of the message like Sender, Subject, Date
2019-11-18 13:00:43 +02:00
Manos Pitsidianakis b2cd4f4b7a
melib/imap: put imap folders in RwLock instead of Mutex
This should prevent lockups if the IMAP conn thread gets blocked
2019-11-18 12:59:04 +02:00
Manos Pitsidianakis 3c3ee92efb
Small Makefile prettification 2019-11-18 12:56:52 +02:00
Manos Pitsidianakis a5e272c36e
Add tests/ dir and a test
Add a test for generating mail with melib's Draft struct.
2019-11-17 13:29:12 +02:00
Manos Pitsidianakis 094ce7ee69
Add format_flowed option for composing e-mail
When format_flowed=true, generated text/plain attachments include the
format=flowed MIME parameter.

format_flowed is set to true by default.
2019-11-17 13:27:22 +02:00
Manos Pitsidianakis 953c3aa9d0
melib: Add parameters field in ContentType::Text
Intending to add the option to set the parameter format=flowed in the
next commits
2019-11-17 13:24:19 +02:00
Manos Pitsidianakis 62f3d12253
ui/view: move reply and edit to
reply and edit actions where only in view/, so simple envelope
views had no way to reply. is used standalone or within
view/ so it is the appropriate place for the actions.
2019-11-17 12:05:57 +02:00
Manos Pitsidianakis f8a2ce0bed
ui: small bounds checking fix in 2019-11-17 12:05:57 +02:00
Manos Pitsidianakis f8a1a6caa5
melib: replace find_thread_group with find_root_hash
thread_group property of ThreadNode doesn't yet reflect the actual root
ThreadNode (the root of the thread, that is). So find the root manually
2019-11-17 12:05:52 +02:00
Manos Pitsidianakis 1168804cf8
ui: add reflow property to Pager
For displaying format=flowed formatted text/plain attachments properly.
2019-11-16 20:23:07 +02:00
Manos Pitsidianakis dfa83e486c
melib: add into_iter() for &StackVec<T> 2019-11-16 20:21:47 +02:00
Manos Pitsidianakis b01b9ffbcb
text_processing: add reflow method() and enum to TextProcessing trait
 split_lines_reflow(&self, reflow: Reflow, width: Option<usize>) -> Vec<String>
method that, according to reflow (No reflow, FormatFlowed
or All) reflows the text.

FormatFlowed follows the rfc3676 - The Text/Plain Format and DelSp Parameters
2019-11-16 20:19:02 +02:00
Manos Pitsidianakis e1dec05881
ui/embed: don't increase cursor with multibyte chars
When waiting for a multibyte unicode codepoint to fill up, don't
increase cursor at all.
2019-11-16 20:00:42 +02:00
Manos Pitsidianakis 04e1137b36
melib: add "On ${date} ${author} wrote" heading in replies 2019-11-16 19:59:47 +02:00
Manos Pitsidianakis bd4cf860fa
ui: persist row highlighting in CompactListing 2019-11-16 14:00:00 +02:00
Manos Pitsidianakis f3a3668f3f
ui: correct redrawing when entering Execute command 2019-11-16 13:42:03 +02:00
Manos Pitsidianakis 0d03116e8a
ui: correct row highlighting in CompactListing 2019-11-16 13:41:33 +02:00
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.
2019-11-16 00:33:22 +02:00
Manos Pitsidianakis aeb9d046a2
ui/ThreadListing: fix uninitialized array entry crash
If ThreadListing is uninitialized, self.locations is empty and
coordinates() would panic.
2019-11-15 23:23:14 +02:00
Manos Pitsidianakis 77936e0cd5
melib: add notmuch backend
- Watching for updates functionality
- Using tags
- Search
2019-11-15 22:56:45 +02:00
Manos Pitsidianakis 7463248da8
melib: change BackendOp::set_flag() signature 2019-11-15 21:32:55 +02:00
Manos Pitsidianakis ede512200b
conf: move FolderConf to melib
This will be needed to add notmuch-specific configuration settings in
the FolderConf struct in the next commit
2019-11-15 19:52:39 +02:00
Manos Pitsidianakis 8f36678abf
melib: make Backendfolder::children return slice 2019-11-14 17:55:24 +02:00
Manos Pitsidianakis 56cda63c83
Fix some warnings 2019-11-14 17:55:24 +02:00
Manos Pitsidianakis c2da09de99
ui/sqlite3: insert account if non-existent 2019-11-12 22:20:20 +02:00
Manos Pitsidianakis f83db67a38
melib/imap: don't stop IDLE session
Previous behaviour: connection with IDLE was stopped every 5 minutes to
poll the other threads. As a result messages received within that time
window when there was no IDLING were never received.
Current behaviour: polling is done in the main connection.
2019-11-12 22:18:00 +02:00
Manos Pitsidianakis 94152f7336
ui: add multiplier shortcuts to cursor movements
Prepend a cursor movement (Up/Down/PageUp/PageDown) with a multiplier
(e.g 23+Down, that is '2' then '3' then 'Down') to increase the
movement's length.
2019-11-12 22:14:44 +02:00
Manos Pitsidianakis 134178a74a
ui/sqlite3: add remove/update for RefreshEvent
Remove and/or update envelopes in sqlite3 db when the appropriate events
2019-11-12 13:09:43 +02:00
Manos Pitsidianakis c6a4fcb959
ui: fix Account watching bug
Account::is_online(&mut self) should be called from ui/src/
only, since it launches the watcher threads when an account goes from
offline to online. If it's called from elsewhere the watcher threads
might not get launched ever.
2019-11-12 13:09:09 +02:00
Manos Pitsidianakis c9c4e1ea60
ui/sqlite3: add has:attachment query 2019-11-11 22:59:37 +02:00
Manos Pitsidianakis 35e34d1c09
ui: add "is:" alias for "flags:" query 2019-11-11 22:48:39 +02:00
Manos Pitsidianakis 6ce88667c0
ui/sqlite3: add flag query support 2019-11-11 22:43:08 +02:00
Manos Pitsidianakis dce1c39b48
ui: add mailcap support 2019-11-11 22:20:16 +02:00
Manos Pitsidianakis 9cd00cf53a
sqlite3: add accounts and folders table 2019-11-11 18:01:01 +02:00