Commit Graph

2132 Commits

Author SHA1 Message Date
Manos Pitsidianakis
3a70979483
Update minimum rust version from 1.65.0 to 1.68.2
Found with `cargo msrv --bisect --min 1.67.0`

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-09 18:01:12 +02:00
Manos Pitsidianakis
24971d1960
Fix compilation with 1.70.0 cargo
Cargo bug: https://github.com/rust-lang/cargo/issues/10788

Caused meli to not be able to be installed with 1.70.0 cargo.

This commit expresses the static dependencies differently to allow both
1.70.0 and later versions understand the optional dependency feature
activation.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-09 17:28:05 +02:00
Manos Pitsidianakis
e37997d697
mail/view: store Link URL value in Link type
Due to changes in how decoded email body is stored in `ViewFilter`s,
the previous way of accessing URL values (by using the `start` and `end`
offset in the e-mail body) meant the offset values might not be correct.

Store the value right away to prevent this from happening.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-09 15:08:56 +02:00
Manos Pitsidianakis
3adba40e32
scripts/make_html_manual_page.py: add macos manpage mirror url
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-06 16:33:19 +02:00
Manos Pitsidianakis
da251455a0
Bump meli version to 0.8.5-rc.2
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-04 17:25:22 +02:00
Manos Pitsidianakis
d16afc7d8d
Bump version to 0.8.5-rc.2
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-04 17:22:56 +02:00
Manos Pitsidianakis
7eedd86051
listings: remove address_list! macro
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-04 16:29:33 +02:00
Manos Pitsidianakis
c751b2e845
Re-enable conversations listing style
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-04 16:22:53 +02:00
Manos Pitsidianakis
031d0f7dc7
terminal: add area.is_empty() checks in cell iterators
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-04 16:20:43 +02:00
Manos Pitsidianakis
2c6f180df9
meli/notifications: fix macos compilation
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-03 18:49:14 +02:00
Manos Pitsidianakis
63a63253d7
melib/datetime: use type alias for c_char
On arm64, it's u8, not i8.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-03 18:08:48 +02:00
Manos Pitsidianakis
71f3ffe740
Update Makefile
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-03 18:08:48 +02:00
Manos Pitsidianakis
10c3b0eabe
Bump version to 0.8.5-rc.1
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 19:20:34 +02:00
Andrei Zisu
64898a0583
melib/imap: Make UIDStore constructor pub
I honestly forget exactly why this change is needed, so I need to
recheck.
2023-12-02 19:05:13 +02:00
Andrei Zisu
77a8d9e2c2
melib: Make ModSequence publicly accessible
This way it can be imported from this namespace in depending code.
2023-12-02 19:00:48 +02:00
Manos Pitsidianakis
ed8a5de2cb
Re-enable EditAttachments component
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:40 +02:00
Manos Pitsidianakis
b5cc2a095f
Upgrade MailboxManager component to new TUI API
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:40 +02:00
Manos Pitsidianakis
5dd71ef1cd
Upgrade JobsView component to new TUI API
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:40 +02:00
Manos Pitsidianakis
28fa66cc2a
Fix ThreadedListing for new TUI API
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:40 +02:00
Manos Pitsidianakis
3b4acc15a5
view/filters: add tests
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis
23c15261e7
mail/view: abstract envelope view filters away
Modularize an envelope view by introducing a stack of "view filters".

Example uses:

- html email can have a view on top of it that is plain text conversion
- selecting and viewing text/* attachments is just appending a new filter at
  the stack

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis
62b8465f2c
Fix ThreadView for new TUI API
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis
1c1be7d6c9
melib/address: add display_name(), display_slice(), display_name_slice() methods
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis
ccf6f9a26e
listing: remember previous set [index_style]] preferences
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis
3495ffd61b
types: Change UIEvent::Notification structure
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:39 +02:00
Manos Pitsidianakis
458258e1aa
Re-enable compact listing style
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
d018f07aa5
Retouch manual pages
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
0114e69542
Add next_search_result and previous_search_result shortcuts
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
0a74c7d0e5
terminal/embedded: overhaul refactor
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
54d21f25fd
Re-add contact list and editor support
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
ba7a97e90b
utilities/tables: add x axis scroll support
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
bcec745c24
utilities: fix command and status bar drawing
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:38 +02:00
Manos Pitsidianakis
b61fc3ab64
utilities: add HelpView struct for shortcuts widget
Re-enable shortcuts view by moving its state in a separate struct.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:37 +02:00
Manos Pitsidianakis
c2ae19d120
mail/view/thread: return Option from current_pos
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:37 +02:00
Manos Pitsidianakis
84f3641ec1
Re-add on-screen message display
Introduce new DisplayMessageBox struct that handles the rendering of
notifications/notices on the overlay screen.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:37 +02:00
Manos Pitsidianakis
0e3a0c4b70
Add safe UI widget area drawing API
Make Screen generic over its display kind: Screen<Tty> and
Screen<Virtual>. The latter is for "cached" renderings we want to keep
and copy to the actual screen when the Component::draw() method is
called. Only Screen<Tty> can write to stdout and it needs an stdout
handle.

Add a generation integer field to Screen, that changes each time it is
resized. This way, we can track if "stale" areas are used and panic on
runtime (in debug mode).

Introduce a new type, Area, that keeps metadata about a subsection of a
Screen, and the generation it came from. New areas can only be created
from a Screen and by operating on an Area to create subsections of it.

This way, it's impossible to make an area refer to (x, y) cells outside
the screen generation of its provenance. If stabilised this API should
eliminate all out of bounds accesses in CellBuffers.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:37 +02:00
Manos Pitsidianakis
7645ff1b87
terminal/cells: rename write_string{to_grid,}
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-30 11:04:05 +02:00
Manos Pitsidianakis
e0adcdfe15
terminal/cells: move rest of methods under CellBuffer
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-30 11:04:05 +02:00
Manos Pitsidianakis
ab14f81900
terminal/cells: make write_string_to_grid a CellBuffer method
For future reference, refactoring was done with comby:

comby -review ":[w~\s]write_string_to_grid(:[s], &mut :[var],:[rest])" ":[var].write_string_to_grid(:[s],:[rest])" .rs
comby -review ":[w~\s]write_string_to_grid(:[s],:[var],:[rest])" ":[var].write_string_to_grid(:[s],:[rest])" .rs

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-30 11:04:05 +02:00
Manos Pitsidianakis
cd2ba80f8e
debian: update metadata
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-27 21:23:00 +02:00
Manos Pitsidianakis
c1c41c9126
Update README.md and add Codeberg mirror
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-27 21:21:17 +02:00
Manos Pitsidianakis
a1cbb1988b
types/File: return Results instead of panicking
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-27 09:40:40 +02:00
Manos Pitsidianakis
470cae6b88
Update thread cache on email flag modifications
On a previous commit email flag modification logic was changed, but
threads cache was not updated, leading to threads unread count being
stale.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-27 09:37:58 +02:00
Manos Pitsidianakis
23507932f9
imap: update cache on set_flags
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-27 09:37:58 +02:00
Manos Pitsidianakis
0500e451da
listing/plain: add missing EnvelopeRemove event handler
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-24 15:27:11 +02:00
Manos Pitsidianakis
6506fffb94
Rewrite email flag modifications
Flag and tag modifications are now somewhat typed better, and the
frontend applies them on its own on success. This means that if you set
an unseen mail as seen but it was already seen in the backend, you will
see the change locally. Previously it would remain unseen.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-24 12:58:21 +02:00
Manos Pitsidianakis
f81a1e2338
Bump version to 0.8.4
0.8.3 had a misbehaving test.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-22 21:48:59 +02:00
Manos Pitsidianakis
ef30228e08
melib/draft: fix failing test
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-22 21:48:59 +02:00
Manos Pitsidianakis
111a1160ad
Bump version to 0.8.3
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-22 15:39:58 +02:00
Manos Pitsidianakis
bfc78a0803
melib/compose: replace CRLF with LF when editing
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-11-22 15:31:04 +02:00