Commit Graph

20 Commits (3e9144657b5f79764c762a0f1e8120a96bcce1f5)

Author SHA1 Message Date
Manos Pitsidianakis 3e9144657b
meli: store children process metadata
Store children process metadata. Pid and command lines can then be shown
in the UI and in logs.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 months ago
Manos Pitsidianakis e2cdebe89c
Add option to highlight self in mailing list threads
Use under `listing` options such as:

globally
========

  [listing]
  highlight_self = true

per-account
===========

  [accounts.work]
  root_mailbox = '[Gmail]'
  format = "imap"
  subscribed_mailboxes = ["*"]
  listing.index_style = "compact"
  listing.highlight_self = true

per-mailbox
===========

  [accounts.work.mailboxes]
  "INBOX/Lists/project-devel" = { listing.highlight_self=true }

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
3 months ago
Manos Pitsidianakis c332c2f5ff
Fix new clippy lints (mostly clippy::blocks_in_conditions)
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
4 months ago
Manos Pitsidianakis 7861fb0402
Fix typos found with `typos` tool
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
5 months ago
Manos Pitsidianakis 8185f2cf7d
meli: add deny clippy lints and fix them
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
5 months ago
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>
6 months ago
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>
6 months ago
Manos Pitsidianakis 3495ffd61b
types: Change UIEvent::Notification structure
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 months ago
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>
6 months ago
Manos Pitsidianakis 7645ff1b87
terminal/cells: rename write_string{to_grid,}
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 months ago
Manos Pitsidianakis e0adcdfe15
terminal/cells: move rest of methods under CellBuffer
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 months ago
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>
6 months ago
Manos Pitsidianakis a1cbb1988b
types/File: return Results instead of panicking
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
6 months ago
Manos Pitsidianakis 81974311c2
mail/view: show current number command buffer
The command buffer in the envelope view records numbers the user presses
and then combines them with an action (e.g. type n in decimal; press
open_url action to open nth link, analogously with attachments).

Since a few commits ago, the command buffer number stopped being printed
on the envelope view.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis 39e99770da
Use Context::current_dir() when saving files to relative paths
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis 7e4ed2fa10
view/envelope: fix some out of bounds drawing.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis 7e3e938631
mail/view: fix out-of-bounds draw when terminal is small
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis a615b4701b
dependencies: embed xdg-utils crate
No reason to have it out of the tree.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
9 months ago
Manos Pitsidianakis 946309c6f3
melib: do some small parser refactoring
- Use HeaderName in parsers instead of raw byte strings.
- Use byte literal constants where appropriate instead of repeating
  &b"___"[..]

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
10 months ago
Manos Pitsidianakis 7c9a4b4b7c
meli: Move components/mail -> mail 10 months ago