From 160c9121ec39d934330cf626978d02d0fa6d0610 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 24 Aug 2026 20:15:17 +0200 Subject: feat(config): read the three signature keys [compose] signature and signature_position, and a per-account signature that OVERRIDES the former. The account seeds the choice rather than owning it: the composer's switch keeps every signature reachable whichever account is selected, which is what keeps the note's "not tied to an account" constraint intact. The fallback is deliberately NOT resolved here. An account with no key of its own carries an empty string, so the composer can tell "says nothing" from "says none" and fall through itself. signature_position follows quote_position's shape exactly, reporting a present-but-malformed value rather than accepting it silently. Part of item 152. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KEcn3u19xPqv6ggD15PG4c --- src/config.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 4dcfbf1..02b4038 100644 --- a/src/config.h +++ b/src/config.h @@ -26,6 +26,7 @@ #include #include "completionentry.h" +#include "signatures.h" class QSettings; @@ -58,6 +59,18 @@ struct Account /// one for the account that has none. QString sent; + /// The signature seeded when composing from this account, by name. + /// + /// Optional, and it does not tie a signature to the account: the switch on + /// the composer's editor bar keeps every signature reachable whichever + /// account is selected. This is a STARTING value only, which is why the + /// user's "not tied to an account" constraint survives it (item 152). + /// + /// The fallback to [compose] signature is NOT resolved here. An account + /// with no key of its own carries an empty string and the composer falls + /// through, so the two values stay distinguishable. + QString signature; + /// The account's trash folder, relative to maildir. /// /// MANDATORY, unlike `sent` and `drafts`. Delete moves a file into this @@ -228,6 +241,16 @@ struct ComposeSettings /// accounts. Falls through when it names an account that cannot send. QString defaultAccount; + /// The signature seeded when the account carries none, by name. Empty + /// means no signature is seeded at all. + QString signature; + + /// Where a newly inserted signature goes. End by default, which is the + /// user's own habit; above_quote exists because other clients offer the + /// choice, and the splice's quote-aware scan is needed for the guard + /// either way. + Signatures::Position signaturePosition = Signatures::Position::End; + qint64 attachmentWarnBytes = 26214400; }; -- cgit v1.2.3