Commit graph

386 commits

Author SHA1 Message Date
Manos Pitsidianakis
a27a28275b
Bump version to 0.8.8
Finally!

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-19 16:14:21 +02:00
Manos Pitsidianakis
7ff1db143f
manage-mailboxes: add delete option
While there was a delete-mailbox command, there was no option for it in
the manage-mailboxes interface, so add it.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-18 16:15:18 +02:00
Manos Pitsidianakis
707a129ea4
Coalesce repeating TUI notification messages
Don't accept new Display Messages if it has the same content as the
latest one in the display message stack.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:44 +02:00
Manos Pitsidianakis
e7a164de0c
Configure some gpgme stuff under gpgme feature
Some stuff that are only used with gpgme feature were not guarded by
 #[cfg(feature = "gpgme")], so fix that.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:08 +02:00
Manos Pitsidianakis
b912aabca2
docs: add examples of file picker usage
Add an example for `fzf` use with the `add-attachment-file-picker < `
command when composing e-mail.

Closes #507

Resolves: <https://git.meli-email.org/meli/meli/issues/507>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 12:27:53 +02:00
Manos Pitsidianakis
cb2dd5def5
listing/threaded: impl missing select functionality
Selecting by searching for was missing for the threaded index style, so
add it.

Related to #513

Resolves: <https://git.meli-email.org/meli/meli/issues/513>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-11 00:55:17 +02:00
Manos Pitsidianakis
c6e9e4245d
listing/threaded: impl missing filter functionality
Somehow, filter (searching) was not implemented for the threaded index
style, so fix it.

Fixes: #513

Resolves: <https://git.meli-email.org/meli/meli/issues/513>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-11 00:41:12 +02:00
Manos Pitsidianakis
2411481196
manage: parse scroll_{left,right} actions
They were previously silently ignored despite tables (DataColumns)
having support for scrolling on the x axis.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:40 +02:00
Manos Pitsidianakis
789a88b28d
shortcuts: add select_motion equivalent to select_entry
Change select_entry to toggle only one's selection entry (default 'V'),
while select_motion (default 'v') inherits the original functionality of
  performing a select motion when combined with a number and motion verb
  (scroll up/down etc)

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:40 +02:00
Manos Pitsidianakis
81ace71b35
terminal/embedded: lift error checking earlier
Lift error checks earlier in the function, before forking, allowing any
potential errors to show up properly in the main process.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:39 +02:00
Manos Pitsidianakis
0d088962d5
lints: Address clippy::too_long_first_doc_paragraph
Ugh, annoying. It doesn't take the fact that markdown links do not
appear long when rendered. Anyway, fix them errors.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:39 +02:00
Manos Pitsidianakis
ee89794248
lints: deny clippy::or_fun_call
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 14:29:40 +02:00
Manos Pitsidianakis
441fda568c
terminal: move TextPresentation trait to melib
Since this is a text-related trait, let's move this to melib's text module
instead.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 13:40:33 +02:00
Manos Pitsidianakis
f656aff08e
composer: add discard-draft command
Add command to discard draft and close the composer tab immediately.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 13:40:32 +02:00
Manos Pitsidianakis
3a93103520
command: move Composer actions under TabActions
Semantically Composer actions should be tab actions since a composer is
a tab. Move them to a new enum in preparation for the next commit which
adds a new Discard draft action.

No functional change intended.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 13:40:32 +02:00
Manos Pitsidianakis
3558db514a
Move jobs and mailbox management Components together
Move the components for :manage-jobs and :manage-mailboxes into the same
submodule, `manage`. No functional change intended.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 13:40:32 +02:00
Manos Pitsidianakis
dba5b68be8
components: add prelude module
Add prelude module with exports that are commonly necessary for
Component types.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 13:40:31 +02:00
Manos Pitsidianakis
6c315580b1
compose: fix add-attachment-file-picker
Related to #507

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-10-24 21:09:18 +03:00
Manos Pitsidianakis
05f404ba1f
jobs: do not use AtomicU64
AtomicU64 is not portable, unfortunately.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-10-16 21:03:43 +03:00
Manos Pitsidianakis
77e7c3df60
Add support for signatures
Add config values to `composing` config section to enable signatures:

   signature_file Path                   (optional) Plain text file with signature that will pre-populate an email draft.  Signatures must be explicitly enabled to be used, otherwise this setting will be ignored.  (None)

   use_signature bool                    Pre-populate email drafts with signature, if any.  meli will lookup the signature value in this order:
                                         1.   The signature_file setting.
                                         2.   ${XDG_CONFIG_DIR}/meli/<account>/signature
                                         3.   ${XDG_CONFIG_DIR}/meli/signature
                                         4.   ${XDG_CONFIG_DIR}/signature
                                         5.   ${HOME}/.signature
                                         6.   No signature otherwise.
                                         (false)

   signature_delimiter String            (optional) Signature delimiter, that is, text that will be prefixed to your signature to separate it from the email body.  (‘\n\n-- \n’)

Closes #498

Resolves: https://git.meli-email.org/meli/meli/issues/498
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-10-05 18:50:02 +03:00
Manos Pitsidianakis
0c590bbc0c
contact-editor: remove empty space
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-10-05 09:41:50 +03:00
Manos Pitsidianakis
5915f125c3
backends: use IsSubscribedFn in method signatures
Despite having the IsSubscribedFn struct wrapper for closures that check
if a mailbox is subscribed or not, backend methods were still using
  Box<dyn Fn(... types. Switch to using the wrapper newtype everywhere.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-10-05 09:31:20 +03:00
Manos Pitsidianakis
32f7e50fd4
Add version migration support
Add infrastructure for custom logic migration support between versions,
allowing breaking changes in for example configuration to be handled by
the application instead of the user.

The current version will be stored in ${XDG_DATA_HOME}/meli/.version

If at launch the versions do not match, the application will examine
whether there are any migrations in the range
previous_version..=current_version, and if they are applicable to the
user's case, it will ask the user to perform them interactively.

Support for reverting migrations is also added.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-24 08:14:31 +03:00
Manos Pitsidianakis
49dcbc5e58
terminal: Extend Ask default actions, prompts
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-23 22:19:40 +03:00
Manos Pitsidianakis
2069b4da09
errors: impl From<xdg::BaseDirectoriesError>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-23 22:18:43 +03:00
Manos Pitsidianakis
8af003abd0
Rename addressbook stuff to "contacts"
Wasn't a nice name to begin with.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-23 09:44:00 +03:00
Manos Pitsidianakis
593ed22ba1
pgp: perform gpgme's sign+encrypt manually
gpgme's sign and encrypt API doesn't seem to work properly; it only
encrypts for some reason. Do it manually which according to RFC 3156 -
MIME Security with OpenPGP is to sign first then encrypt the whole
thing.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-22 17:18:42 +03:00
Manos Pitsidianakis
e032acfab7
view: pass filtered body to Composer as reply text
When replying to an e-mail, pass the filtered e-mail text to the
composer. This way, processed text like decrypted PGP e-mail is shown in
the reply context of a reply as the user expects.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-22 00:12:59 +03:00
Manos Pitsidianakis
2001b4dd06
Make subscribed_mailboxes conf val optional
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-21 13:06:01 +03:00
Manos Pitsidianakis
1b201bf611
Remove GlobMatch trait, replace usage with Fnmatch
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-21 09:57:15 +03:00
Manos Pitsidianakis
7f0157a966
compose: make dialogs bigger in height
Otherwise they might be hidden in small screens.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-20 08:48:53 +03:00
Manos Pitsidianakis
e6fa7093bf
view/envelope: trim headers values to 3 lines maximum
Prevent large header values (e.g. big list of recipients in To/Cc) take
big part of the view. Allow the full value to be visible when the
`expand_headers` option is toggled on.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-19 18:44:19 +03:00
Manos Pitsidianakis
23395491db
compose/pgp: add encrypt_for_self flag
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-19 18:41:07 +03:00
Manos Pitsidianakis
c82341f3af
File: try trimming filename if ENAMETOOLONG
Commit 8f0e1d6640 added human-readable
identifiers in temp draft files but neglected to handle cases where
those identifiers were too darn long.

Fixes: 8f0e1d664 ("Add human-readable identifiers in temp draft files")
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-19 18:41:06 +03:00
Manos Pitsidianakis
b1f24cbe95
view/filters: forward events on child filters
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-19 18:41:06 +03:00
Manos Pitsidianakis
a69122f8b0
pgp: use default sign/encrypt keys when no keys are selected
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-19 18:41:06 +03:00
Manos Pitsidianakis
7cfcbb7ab1
Add patch_retrieve module
Allow patches to be retrieved from sources like lore.kernel.org or other
public-inbox instances.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-17 13:44:50 +03:00
Manos Pitsidianakis
b33433e457
Don't create backends as Box<dyn MailBackend>, but as Box<Self>
It's unnecessary and makes it difficult for an API consumer to turn a
backend back to its original type.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-17 10:35:55 +03:00
Manos Pitsidianakis
aaea3a5ab4
nntp: add timeout conf flag
To match IMAP and JMAP, add a configuration flag `timeout` to use for
server connections.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-14 10:52:47 +03:00
Manos Pitsidianakis
571ae390b8
pager.rs: don't set self dirty after filter selector
After generating a filter selector global dialog, there's no need to
set self as dirty.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-12 21:47:07 +03:00
Manos Pitsidianakis
2ddd28ee85
main.rs: always send a JobFinished event to all components
JobFinished events were sent from account job handlers, but that means
the events would never be generated when using meli without accounts
e.g. with the `view` subcommand.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-12 21:45:45 +03:00
Manos Pitsidianakis
7dbee81dad
view: fix nested filter jobs never being completed
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-12 21:44:42 +03:00
Manos Pitsidianakis
46b2c3b1f7
Add listing.thread_layout config flag
Allows the user to set the default thread layout and takes the values
"auto" | "vertical" | "horizontal". The layout can always be changed at
runtime with the `listing.toggle_layout` shortcut.

Closes #484

Resolves: <https://git.meli-email.org/meli/meli/issues/484>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-12 15:15:52 +03:00
Manos Pitsidianakis
d0c81749ee
conf::data_types: minor style and error msg fixups
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-12 15:15:51 +03:00
Manos Pitsidianakis
ba3ad8ed18
listing: always show mail_view_divider
`mail_view_divider` was only drawn in the path where the sidebar was
visible.

Concerns #483

Fixes: 719e2eb271 ("listing: add customizable view divider like sidebar's")
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-10 16:47:01 +03:00
Manos Pitsidianakis
719e2eb271
listing: add customizable view divider like sidebar's
Closes #483

Resolves: <https://git.meli-email.org/meli/meli/issues/483>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-09 16:31:35 +03:00
Manos Pitsidianakis
b88dc4412b
Comment out svgfeature; no need to ship it
Svg feature was meant for taking SVG screenshots for the readme/website.
There's no real need to ship it, considering a lot of distros enable all
features by default.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-08 11:30:03 +03:00
Manos Pitsidianakis
e9a72072bf
Remove unused/obsolete plugins code and mentions
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-08 11:30:03 +03:00
Manos Pitsidianakis
c051190114
Update debian/meli.{docs,examples} and Cargo exclude
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-08 11:30:03 +03:00
Manos Pitsidianakis
d20a9d0afa
Fix new clippy lints
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-09-08 11:30:03 +03:00