meli: Move components/mail -> mail
parent
64ab65ddff
commit
7c9a4b4b7c
|
@ -28,13 +28,6 @@
|
|||
use smallvec::SmallVec;
|
||||
|
||||
use super::*;
|
||||
use crate::{
|
||||
melib::text_processing::{TextProcessing, Truncate},
|
||||
terminal::boundaries::*,
|
||||
};
|
||||
|
||||
pub mod mail;
|
||||
pub use mail::*;
|
||||
|
||||
pub mod notifications;
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
use std::{collections::BTreeMap, io::Write};
|
||||
|
||||
use super::*;
|
||||
use crate::melib::text_processing::TextProcessing;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct SVGScreenshotFilter {
|
||||
|
|
|
@ -186,7 +186,7 @@ pub enum SendMail {
|
|||
}
|
||||
|
||||
/// Shell command compose hooks (See
|
||||
/// [`crate::components::mail::compose::hooks::Hook`])
|
||||
/// [`crate::mail::compose::hooks::Hook`])
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct ComposeHook {
|
||||
|
@ -196,7 +196,7 @@ pub struct ComposeHook {
|
|||
command: String,
|
||||
}
|
||||
|
||||
impl From<ComposeHook> for crate::components::mail::hooks::Hook {
|
||||
impl From<ComposeHook> for crate::mail::hooks::Hook {
|
||||
fn from(c: ComposeHook) -> Self {
|
||||
Self::new_shell_command(c.name.into(), c.command)
|
||||
}
|
||||
|
|
|
@ -80,6 +80,9 @@ pub use crate::utilities::*;
|
|||
pub mod contacts;
|
||||
pub use crate::contacts::*;
|
||||
|
||||
pub mod mail;
|
||||
pub use crate::mail::*;
|
||||
|
||||
#[macro_use]
|
||||
pub mod conf;
|
||||
pub use crate::conf::{
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
//! Entities that handle Mail specific functions.
|
||||
|
||||
use indexmap::IndexMap;
|
||||
use melib::{
|
||||
backends::{AccountHash, Mailbox, MailboxHash},
|
||||
email::{attachment_types::*, attachments::*},
|
||||
|
@ -28,6 +29,11 @@ use melib::{
|
|||
};
|
||||
|
||||
use super::*;
|
||||
use crate::{
|
||||
boundaries::*,
|
||||
melib::text_processing::{TextProcessing, Truncate},
|
||||
uuid::Uuid,
|
||||
};
|
||||
|
||||
pub mod listing;
|
||||
pub use crate::listing::*;
|
|
@ -136,8 +136,8 @@ impl ViewMode {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Composer {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for Composer {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
if self.reply_context.is_some() {
|
||||
write!(
|
||||
f,
|
||||
|
@ -2305,7 +2305,7 @@ pub fn send_draft(
|
|||
.into();
|
||||
}
|
||||
let output = todo!();
|
||||
crate::components::mail::pgp::sign(
|
||||
crate::mail::pgp::sign(
|
||||
body.into(),
|
||||
account_settings!(context[account_hash].pgp.gpg_binary)
|
||||
.as_ref()
|
||||
|
@ -2420,11 +2420,11 @@ pub fn send_draft_async(
|
|||
> = vec![];
|
||||
#[cfg(feature = "gpgme")]
|
||||
if gpg_state.sign_mail.is_true() && !gpg_state.encrypt_mail.is_true() {
|
||||
filters_stack.push(Box::new(crate::components::mail::pgp::sign_filter(
|
||||
filters_stack.push(Box::new(crate::mail::pgp::sign_filter(
|
||||
gpg_state.sign_keys,
|
||||
)?));
|
||||
} else if gpg_state.encrypt_mail.is_true() {
|
||||
filters_stack.push(Box::new(crate::components::mail::pgp::encrypt_filter(
|
||||
filters_stack.push(Box::new(crate::mail::pgp::encrypt_filter(
|
||||
if gpg_state.sign_mail.is_true() {
|
||||
Some(gpg_state.sign_keys.clone())
|
||||
} else {
|
|
@ -946,8 +946,8 @@ pub struct Listing {
|
|||
view: Box<ThreadView>,
|
||||
}
|
||||
|
||||
impl fmt::Display for Listing {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for Listing {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self.component {
|
||||
Compact(ref l) => write!(f, "{}", l),
|
||||
Plain(ref l) => write!(f, "{}", l),
|
|
@ -936,8 +936,8 @@ impl ListingTrait for CompactListing {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for CompactListing {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for CompactListing {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "mail")
|
||||
}
|
||||
}
|
|
@ -676,8 +676,8 @@ impl ListingTrait for ConversationsListing {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ConversationsListing {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for ConversationsListing {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "mail")
|
||||
}
|
||||
}
|
|
@ -111,8 +111,8 @@ impl ListingTrait for OfflineListing {
|
|||
fn set_focus(&mut self, _new_value: Focus, _context: &mut Context) {}
|
||||
}
|
||||
|
||||
impl fmt::Display for OfflineListing {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for OfflineListing {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "mail")
|
||||
}
|
||||
}
|
|
@ -654,8 +654,8 @@ impl ListingTrait for PlainListing {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for PlainListing {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for PlainListing {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "mail")
|
||||
}
|
||||
}
|
|
@ -729,8 +729,8 @@ impl ListingTrait for ThreadListing {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ThreadListing {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for ThreadListing {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "mail")
|
||||
}
|
||||
}
|
|
@ -33,8 +33,8 @@ pub struct AccountStatus {
|
|||
id: ComponentId,
|
||||
}
|
||||
|
||||
impl fmt::Display for AccountStatus {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for AccountStatus {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "status")
|
||||
}
|
||||
}
|
|
@ -77,8 +77,8 @@ impl Clone for MailView {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for MailView {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for MailView {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "view mail")
|
||||
}
|
||||
}
|
|
@ -70,8 +70,8 @@ impl Clone for EnvelopeView {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for EnvelopeView {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for EnvelopeView {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "view mail")
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ impl EnvelopeView {
|
|||
#[cfg(feature = "gpgme")]
|
||||
{
|
||||
if view_settings.auto_verify_signatures {
|
||||
let verify_fut = crate::components::mail::pgp::verify(a.clone());
|
||||
let verify_fut = crate::mail::pgp::verify(a.clone());
|
||||
let handle = main_loop_handler
|
||||
.job_executor
|
||||
.spawn_specialized("gpg::verify_sig".into(), verify_fut);
|
||||
|
@ -314,8 +314,7 @@ impl EnvelopeView {
|
|||
#[cfg(feature = "gpgme")]
|
||||
{
|
||||
if view_settings.auto_decrypt {
|
||||
let decrypt_fut =
|
||||
crate::components::mail::pgp::decrypt(a.raw().to_vec());
|
||||
let decrypt_fut = crate::mail::pgp::decrypt(a.raw().to_vec());
|
||||
let handle = main_loop_handler
|
||||
.job_executor
|
||||
.spawn_specialized("gpg::decrypt".into(), decrypt_fut);
|
|
@ -140,8 +140,8 @@ impl HtmlView {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for HtmlView {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for HtmlView {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "view")
|
||||
}
|
||||
}
|
|
@ -974,8 +974,8 @@ impl ThreadView {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ThreadView {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
impl std::fmt::Display for ThreadView {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "view thread")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue