Commit Graph

690 Commits (feature/export-vcards)

Author SHA1 Message Date
Manos Pitsidianakis 03da43b0ce
contacts/list: impl entry selection WIP 1 year ago
Manos Pitsidianakis fdc0861ac0
view/thread.rs: fix expanded_hash argument off by one error
When calling ThreadView::new with an envelope hash, Some(expanded_hash),
in the arguments, when translating it to a cursor position (usize) it
was mistakenly subtracted with 1 resulting in the wrong thread entry
showing up as expanded.
1 year ago
Manos Pitsidianakis 45bac6eb16
meli: Tidy up use of debug!
melib::debug! macro was deprecated when we started using the `log` crate
in `melib`. This commit replaces it with log::{debug,trace}! macro uses.
1 year ago
Manos Pitsidianakis 575509f1ed
mail/listing.rs: move mail view to listing parent component
Instead of having a different widget to view mail in for each Listing
(plain, threaded, compact, etc) use a single widget in the listing's
parent type.

This will help with making the listing logic more modular in future
refactors to allow all combinations of listing/mail view/ thread view
positions and layouts.
1 year ago
Manos Pitsidianakis 5c9b3fb044
component: impl Component for Box<dyn Component>
Useful to have.
1 year ago
Manos Pitsidianakis 155fb41b93
components.rs: remove unused Component::set_id method 1 year ago
Manos Pitsidianakis 96537e48c5
Add {Timer,Component}Id wrapper types over Uuid 1 year ago
Manos Pitsidianakis 4da5366959
Remove bincode dep, use serde_json for sqlite3 values 1 year ago
Manos Pitsidianakis d33f9d54c7
terminal/keys: remove unreachable!() in Key::serialize 1 year ago
Manos Pitsidianakis d7e6b40b7e accounts: auto re-index sqlite3 database if it's missing
Instead of telling user to do it themselves
1 year ago
Manos Pitsidianakis 27a4dcb916
Fix some rustdoc lints 1 year ago
Manos Pitsidianakis 299c8e0f99
meli: restructure pub use melib::* imports 1 year ago
Manos Pitsidianakis 6bf1756de8 melib/search: implement more search criteria in Query type 1 year ago
Manos Pitsidianakis f537c24909 utilities/widgets.rs: move text field to its own module 1 year ago
Manos Pitsidianakis 58889bcadd
pager: Add show_extra_headers option
Show custom set headers on pager, if existent.

Quoting meli.conf(5):

> show_extra_headers [String]           (optional) Extra headers to
>                                      display, if present, in the
>                                      default header preamble of
>                                      the pager.  This setting is
>                                      useful especially when used
>                                      per-folder or per-account.
>                                      For example, if you use
>                                      ‘rss2email’ (See r2e(1)) the
>                                      e-mail you will receive will
>                                      have the ‘X-RSS-Feed’ header
>                                      by default.  You can show
>                                      them only in the folder
>                                      where you keep your feed
>                                      items:
>
>                                      [accounts."personal".mailboxes]
>                                      INBOX = {}
>                                      "INBOX/Sent" = { sort_order=0 }
>                                      "INBOX/Feeds" = { pager.show_extra_headers = ["X-RSS-Feed"] }
>                                      (empty)
1 year ago
Manos Pitsidianakis 954329d848 Set file extensions to temp files, use `open` in macos
If html_filter fails, meli unwraps it. Also, if it can't find an xdg default app it also fails.

So use xdg-open and open as failsaifes.

But that requires `open` to know it's an html file, so implemented setting temp file extensions as well.
1 year ago
Manos Pitsidianakis aebff3d3d9 melib: implement mailto RFC properly
This allows mailto links with `In-Reply-To` parameters to work properly.

PS Mailto links can be used with the `mailto MAILTO_URI` command
1 year ago
Manos Pitsidianakis 235fceaf21 melib: Add standard heeder constants in email::headers
Like `http` crate does
1 year ago
Manos Pitsidianakis c9d26bb415
mail/compose: add configurable custom hooks with shell commands
Quoting the docs at meli.conf(5):

```text
 custom_compose_hooks [{ name = String, command = String }]

 (optional) Custom compose-hooks that run shell scripts.
 compose-hooks run before submitting an e-mail.
 They perform draft validation and/or transformations.
 If a custom hook exits with an error status or prints output to
 stdout and stderr, it will show up in the UI as a notification.

 Example:

 [composing]
 editor_cmd = '~/.local/bin/vim +/^$'
 embed = true
 custom_compose_hooks = [ { name ="spellcheck", command="aspell --mode email --dont-suggest --ignore-case list" }]
 ```
1 year ago
Manos Pitsidianakis cc27639fca
melib/email/compose: use Envelope attachments when editing and don't add already existing headers 1 year ago
Damian Poddebniak f63f6445ad chore: Improve error message when `m4` executable is missing. 1 year ago
Manos Pitsidianakis 91557c2c43
mail/listing.rs: prevent list blank when refreshing account
Mail list would go blank if the currently focused account received a
Status update event.
1 year ago
Manos Pitsidianakis 428f752b20
Remove obsolete crate::components::mail::get_display_name() 1 year ago
Manos Pitsidianakis 8c671935f9
Add compose (pre-submission) hooks for validation/linting
compose-hooks run before submitting an e-mail.
They perform draft validation and/or transformations.
If a hook encounters an error or warning, it will show up as a notification.
The currently available hooks are:
- past-date-warn
  Warn if Date header value is far in the past or future.
- important-header-warn
  Warn if important headers (From, Date, To, Cc, Bcc) are missing or invalid.
- missing-attachment-warn
  Warn if Subject, draft body mention attachments but they are missing.
- empty-draft-warn
  Warn if draft has no subject and no body.

They can be disabled with [composing.disabled_compose_hooks] setting.
1 year ago
Manos Pitsidianakis 1f1ea30769
components/mail/view: on draw() set dirty on return 1 year ago
Manos Pitsidianakis 85d4316a6a
Replace old logging module with the `log` create 1 year ago
Manos Pitsidianakis 30cc5d3d02
docs: add edit-config in manpages 1 year ago
Manos Pitsidianakis b1a7188771
Clippy fixes 1 year ago
Manos Pitsidianakis 47e6d5d935
meli: add edit-config CLI subcommand that opens config files on EDITOR 1 year ago
Manos Pitsidianakis d9c07def0f
Add command to select charset encoding for email
Open dialog to select charset with `d`.
1 year ago
Manos Pitsidianakis 3adf72aed0
Add support for utf-7 encoding
Closes #175
1 year ago
Manos Pitsidianakis 11140b4a76 Fix test output
test_compose_reply_subject_prefix requires access to / path, and fails
when building with deb-dist
1 year ago
Manos Pitsidianakis f9ac9b607a Temporarily disable libgpgme functions because of a bug
`Possible incorrect libgpgme API usage causes a SIGABRT when verifying
signatures #176`

<https://git.meli.delivery/meli/meli/issues/176>
1 year ago
Manos Pitsidianakis 660bacb926 Add `mailto` command to open composer with initial values from mailto template 1 year ago
Manos Pitsidianakis de2f46fe61 rustfmt changes 1 year ago
Manos Pitsidianakis 40c6647db8 Fix multipart/related with main text/html part not displayed correctly 2 years ago
Manos Pitsidianakis f63ce388f7 commands: move ManageMailboxes to Tab Actions 2 years ago
Manos Pitsidianakis c06c3f5893 mail/listing/conversations: draw gap between list and mail view 2 years ago
Manos Pitsidianakis abc56eae43 mail/listing: fix SEEN flag update hiding mail view momentarily 2 years ago
Manos Pitsidianakis 4f45b10974 mail/listing: fix tag updates not showing up right away
Closes #132
Closes #133
2 years ago
Manos Pitsidianakis 5634f95553 Rename MeliError struct to Error 2 years ago
Manos Pitsidianakis 259aeb0087 Convert {Account,Mailbox}Hash from typedef to wrapper struct 2 years ago
Manos Pitsidianakis 7382e30160 Convert EnvelopeHash from typedef to wrapper struct 2 years ago
Manos Pitsidianakis 2427b097c5 themes: make tag_default background lighter on light theme
Closes #164
2 years ago
Manos Pitsidianakis 252d2bdf2f Replace hardcoded /bin/false with 'false'
Credits to http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/meli/patches/patch-src_conf_rs?rev=1.1.1.1&content-type=text/x-cvsweb-markup
2 years ago
Manos Pitsidianakis 4b96bd591f mail/listing: add ColorCache constructor to deduplicate code 2 years ago
Manos Pitsidianakis b9030a684c listings: fix selection not appearing immediately and invalid motions 2 years ago
Manos Pitsidianakis 7af893597f conf/shortcuts.rs: replace use of Self::DESCRIPTION with Shortcuts struct consts 2 years ago
Manos Pitsidianakis 7d9cabb023 Add mailbox manager tab 2 years ago
Manos Pitsidianakis ee9d458b05 accounts.rs: implement mailbox {un,}sub actions 2 years ago