diff --git a/src/crypto/encryptemailcontroller.cpp b/src/crypto/encryptemailcontroller.cpp index 695a0f4a3..50b9ce120 100644 --- a/src/crypto/encryptemailcontroller.cpp +++ b/src/crypto/encryptemailcontroller.cpp @@ -1,305 +1,299 @@ /* -*- mode: c++; c-basic-offset:4 -*- crypto/encryptemailcontroller.cpp This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB SPDX-License-Identifier: GPL-2.0-or-later */ #include #include "encryptemailcontroller.h" #include "kleopatra_debug.h" #include "encryptemailtask.h" #include "taskcollection.h" #include #include #include #include #include #include -#include "emailoperationspreferences.h" - #include - #include #include using namespace Kleo; using namespace Kleo::Crypto; using namespace Kleo::Crypto::Gui; using namespace GpgME; using namespace KMime::Types; class EncryptEMailController::Private { friend class ::Kleo::Crypto::EncryptEMailController; EncryptEMailController *const q; public: explicit Private(Mode mode, EncryptEMailController *qq); private: void slotWizardCanceled(); private: void ensureWizardCreated(); void ensureWizardVisible(); void cancelAllTasks(); void schedule(); std::shared_ptr takeRunnable(GpgME::Protocol proto); private: const Mode mode; std::vector< std::shared_ptr > runnable, completed; std::shared_ptr cms, openpgp; QPointer wizard; }; EncryptEMailController::Private::Private(Mode m, EncryptEMailController *qq) : q(qq), mode(m), runnable(), cms(), openpgp(), wizard() { } EncryptEMailController::EncryptEMailController(const std::shared_ptr &xc, Mode mode, QObject *p) : Controller(xc, p), d(new Private(mode, this)) { } EncryptEMailController::EncryptEMailController(Mode mode, QObject *p) : Controller(p), d(new Private(mode, this)) { } EncryptEMailController::~EncryptEMailController() { if (d->wizard && !d->wizard->isVisible()) { delete d->wizard; } - //d->wizard->close(); ### ? } EncryptEMailController::Mode EncryptEMailController::mode() const { return d->mode; } void EncryptEMailController::setProtocol(Protocol proto) { d->ensureWizardCreated(); const Protocol protocol = d->wizard->presetProtocol(); kleo_assert(protocol == UnknownProtocol || protocol == proto); d->wizard->setPresetProtocol(proto); } Protocol EncryptEMailController::protocol() { d->ensureWizardCreated(); return d->wizard->selectedProtocol(); } const char *EncryptEMailController::protocolAsString() { switch (protocol()) { case OpenPGP: return "OpenPGP"; case CMS: return "CMS"; default: throw Kleo::Exception(gpg_error(GPG_ERR_INTERNAL), i18n("Call to EncryptEMailController::protocolAsString() is ambiguous.")); } } void EncryptEMailController::startResolveRecipients() { startResolveRecipients(std::vector(), std::vector()); } void EncryptEMailController::startResolveRecipients(const std::vector &recipients, const std::vector &senders) { d->ensureWizardCreated(); d->wizard->setRecipients(recipients, senders); d->ensureWizardVisible(); } void EncryptEMailController::Private::slotWizardCanceled() { q->setLastError(gpg_error(GPG_ERR_CANCELED), i18n("User cancel")); q->emitDoneOrError(); } void EncryptEMailController::setInputAndOutput(const std::shared_ptr &input, const std::shared_ptr &output) { setInputsAndOutputs(std::vector< std::shared_ptr >(1, input), std::vector< std::shared_ptr >(1, output)); } void EncryptEMailController::setInputsAndOutputs(const std::vector< std::shared_ptr > &inputs, const std::vector< std::shared_ptr > &outputs) { kleo_assert(!inputs.empty()); kleo_assert(outputs.size() == inputs.size()); std::vector< std::shared_ptr > tasks; tasks.reserve(inputs.size()); d->ensureWizardCreated(); const std::vector keys = d->wizard->resolvedCertificates(); kleo_assert(!keys.empty()); for (unsigned int i = 0, end = inputs.size(); i < end; ++i) { const std::shared_ptr task(new EncryptEMailTask); task->setInput(inputs[i]); task->setOutput(outputs[i]); if (d->mode == ClipboardMode) { task->setAsciiArmor(true); } task->setRecipients(keys); tasks.push_back(task); } d->runnable.swap(tasks); } void EncryptEMailController::start() { std::shared_ptr coll(new TaskCollection); std::vector > tmp; std::copy(d->runnable.begin(), d->runnable.end(), std::back_inserter(tmp)); coll->setTasks(tmp); d->ensureWizardCreated(); d->wizard->setTaskCollection(coll); for (const std::shared_ptr &t : std::as_const(tmp)) { connectTask(t); } d->schedule(); } void EncryptEMailController::Private::schedule() { if (!cms) if (const std::shared_ptr t = takeRunnable(CMS)) { t->start(); cms = t; } if (!openpgp) if (const std::shared_ptr t = takeRunnable(OpenPGP)) { t->start(); openpgp = t; } if (cms || openpgp) { return; } kleo_assert(runnable.empty()); q->emitDoneOrError(); } std::shared_ptr EncryptEMailController::Private::takeRunnable(GpgME::Protocol proto) { const auto it = std::find_if(runnable.begin(), runnable.end(), [proto](const std::shared_ptr &task) { return task->protocol() == proto; }); if (it == runnable.end()) { return std::shared_ptr(); } const std::shared_ptr result = *it; runnable.erase(it); return result; } void EncryptEMailController::doTaskDone(const Task *task, const std::shared_ptr &result) { Q_UNUSED(result) Q_ASSERT(task); // We could just delete the tasks here, but we can't use // Qt::QueuedConnection here (we need sender()) and other slots // might not yet have executed. Therefore, we push completed tasks // into a burial container if (task == d->cms.get()) { d->completed.push_back(d->cms); d->cms.reset(); } else if (task == d->openpgp.get()) { d->completed.push_back(d->openpgp); d->openpgp.reset(); } QMetaObject::invokeMethod(this, [this]() { d->schedule(); }, Qt::QueuedConnection); } void EncryptEMailController::cancel() { try { if (d->wizard) { d->wizard->close(); } d->cancelAllTasks(); } catch (const std::exception &e) { qCDebug(KLEOPATRA_LOG) << "Caught exception: " << e.what(); } } void EncryptEMailController::Private::cancelAllTasks() { // we just kill all runnable tasks - this will not result in // signal emissions. runnable.clear(); // a cancel() will result in a call to if (cms) { cms->cancel(); } if (openpgp) { openpgp->cancel(); } } void EncryptEMailController::Private::ensureWizardCreated() { if (wizard) { return; } std::unique_ptr w(new EncryptEMailWizard); w->setAttribute(Qt::WA_DeleteOnClose); - Kleo::EMailOperationsPreferences prefs; - w->setQuickMode(prefs.quickEncryptEMail()); connect(w.get(), &EncryptEMailWizard::recipientsResolved, q, &EncryptEMailController::recipientsResolved, Qt::QueuedConnection); connect(w.get(), &EncryptEMailWizard::canceled, q, [this]() { slotWizardCanceled(); }, Qt::QueuedConnection); wizard = w.release(); } void EncryptEMailController::Private::ensureWizardVisible() { ensureWizardCreated(); q->bringToForeground(wizard); } #include "moc_encryptemailcontroller.cpp" diff --git a/src/crypto/gui/encryptemailwizard.cpp b/src/crypto/gui/encryptemailwizard.cpp index a19a277f3..919d01ca6 100644 --- a/src/crypto/gui/encryptemailwizard.cpp +++ b/src/crypto/gui/encryptemailwizard.cpp @@ -1,58 +1,44 @@ /* -*- mode: c++; c-basic-offset:4 -*- crypto/gui/encryptemailwizard.cpp This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB + SPDX-FileCopyrightText: 2023 g10 Code GmbH + SPDX-FileContributor: Ingo Klöcker SPDX-License-Identifier: GPL-2.0-or-later */ #include #include "encryptemailwizard.h" -#include + +#include #include using namespace Kleo; using namespace Kleo::Crypto; using namespace Kleo::Crypto::Gui; -class EncryptEMailWizard::Private -{ -public: - bool m_quickMode = false; -}; - -EncryptEMailWizard::EncryptEMailWizard(QWidget *parent, Qt::WindowFlags flags) : SignEncryptWizard(parent, flags), d(new Private) +EncryptEMailWizard::EncryptEMailWizard(QWidget *parent, Qt::WindowFlags flags) + : SignEncryptWizard(parent, flags) { - setWindowTitle(i18nc("@title:window", "Encrypt Mail Message")); + setWindowTitle(i18nc("@title:window", "Encrypt Text")); std::vector pageOrder; pageOrder.push_back(Page::ResolveRecipients); pageOrder.push_back(Page::Result); setPageOrder(pageOrder); setCommitPage(Page::ResolveRecipients); -} - -EncryptEMailWizard::~EncryptEMailWizard() -{ + setKeepResultPageOpenWhenDone(Kleo::Settings{}.showResultsAfterEncryptingClipboard()); } -bool EncryptEMailWizard::quickMode() const -{ - return d->m_quickMode; -} - -void EncryptEMailWizard::setQuickMode(bool quick) +EncryptEMailWizard::~EncryptEMailWizard() { - if (quick == d->m_quickMode) { - return; - } - d->m_quickMode = quick; - signerResolvePage()->setAutoAdvance(quick); - resolveRecipientsPage()->setAutoAdvance(quick); - setKeepResultPageOpenWhenDone(!quick); + // always save the setting even if the dialog was canceled (the dialog's result + // is always Rejected because the result page has no Finish button) + Kleo::Settings settings; + settings.setShowResultsAfterEncryptingClipboard(keepResultPageOpenWhenDone()); + settings.save(); } - -#include "encryptemailwizard.h" diff --git a/src/crypto/gui/encryptemailwizard.h b/src/crypto/gui/encryptemailwizard.h index 69ed4c0fd..02fbf05b1 100644 --- a/src/crypto/gui/encryptemailwizard.h +++ b/src/crypto/gui/encryptemailwizard.h @@ -1,37 +1,31 @@ /* -*- mode: c++; c-basic-offset:4 -*- crypto/gui/encryptemailwizard.h This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include namespace Kleo { namespace Crypto { namespace Gui { class EncryptEMailWizard : public SignEncryptWizard { Q_OBJECT public: explicit EncryptEMailWizard(QWidget *parent = nullptr, Qt::WindowFlags flags = {}); ~EncryptEMailWizard() override; - - bool quickMode() const; - void setQuickMode(bool quick); - -private: - class Private; - kdtools::pimpl_ptr d; }; + } } } diff --git a/src/crypto/gui/signemailwizard.cpp b/src/crypto/gui/signemailwizard.cpp index bb1f2e47a..2b20a5145 100644 --- a/src/crypto/gui/signemailwizard.cpp +++ b/src/crypto/gui/signemailwizard.cpp @@ -1,149 +1,126 @@ /* -*- mode: c++; c-basic-offset:4 -*- crypto/gui/signemailwizard.cpp This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB + SPDX-FileCopyrightText: 2023 g10 Code GmbH + SPDX-FileContributor: Ingo Klöcker SPDX-License-Identifier: GPL-2.0-or-later */ #include #include "signemailwizard.h" #include "signerresolvepage.h" +#include + #include #include #include using namespace Kleo; using namespace Kleo::Crypto::Gui; using namespace GpgME; namespace { class SignerResolveValidator : public SignerResolvePage::Validator { public: explicit SignerResolveValidator(SignerResolvePage *page); bool isComplete() const override; QString explanation() const override; void update() const; QString customWindowTitle() const override { return QString(); } private: SignerResolvePage *m_page; mutable QString expl; mutable bool complete; }; } SignerResolveValidator::SignerResolveValidator(SignerResolvePage *page) : SignerResolvePage::Validator(), m_page(page), complete(true) { Q_ASSERT(m_page); } void SignerResolveValidator::update() const { const bool haveSelected = !m_page->selectedProtocols().empty(); const std::set missing = m_page->selectedProtocolsWithoutSigningCertificate(); complete = haveSelected && missing.empty(); expl.clear(); if (complete) { return; } if (!haveSelected) { expl = i18n("You need to select a signing certificate to proceed."); return; } Q_ASSERT(missing.size() <= 2); if (missing.size() == 1) { if (missing.find(OpenPGP) != missing.end()) { expl = i18n("You need to select an OpenPGP signing certificate to proceed."); } else { expl = i18n("You need to select an S/MIME signing certificate to proceed."); } } else { expl = i18n("You need to select an OpenPGP signing certificate and an S/MIME signing certificate to proceed."); } } QString SignerResolveValidator::explanation() const { update(); return expl; } bool SignerResolveValidator::isComplete() const { update(); return complete; } -class SignEMailWizard::Private -{ - friend class ::Kleo::Crypto::Gui::SignEMailWizard; - SignEMailWizard *const q; -public: - explicit Private(SignEMailWizard *qq); - ~Private(); - - void operationSelected(); - - bool m_quickMode; -}; - -SignEMailWizard::Private::Private(SignEMailWizard *qq) - : q(qq), m_quickMode(false) +SignEMailWizard::SignEMailWizard(QWidget *parent, Qt::WindowFlags f) + : SignEncryptWizard(parent, f) { - q->setWindowTitle(i18nc("@title:window", "Sign Mail Message")); + setWindowTitle(i18nc("@title:window", "Sign Text")); std::vector pageOrder; - q->setSignerResolvePageValidator(std::shared_ptr(new SignerResolveValidator(q->signerResolvePage()))); + setSignerResolvePageValidator(std::shared_ptr(new SignerResolveValidator(signerResolvePage()))); pageOrder.push_back(Page::ResolveSigner); pageOrder.push_back(Page::Result); - q->setPageOrder(pageOrder); - q->setCommitPage(Page::ResolveSigner); - q->setEncryptionSelected(false); - q->setEncryptionUserMutable(false); - q->setSigningSelected(true); - q->setSigningUserMutable(false); - q->signerResolvePage()->setProtocolSelectionUserMutable(false); - q->setMultipleProtocolsAllowed(false); -} - -SignEMailWizard::Private::~Private() {} - -SignEMailWizard::SignEMailWizard(QWidget *parent, Qt::WindowFlags f) - : SignEncryptWizard(parent, f), d(new Private(this)) -{ -} - -bool SignEMailWizard::quickMode() const -{ - return d->m_quickMode; + setPageOrder(pageOrder); + setCommitPage(Page::ResolveSigner); + setEncryptionSelected(false); + setEncryptionUserMutable(false); + setSigningSelected(true); + setSigningUserMutable(false); + signerResolvePage()->setProtocolSelectionUserMutable(false); + setMultipleProtocolsAllowed(false); + + setKeepResultPageOpenWhenDone(Kleo::Settings{}.showResultsAfterSigningClipboard()); } -void SignEMailWizard::setQuickMode(bool quick) +SignEMailWizard::~SignEMailWizard() { - if (quick == d->m_quickMode) { - return; - } - d->m_quickMode = quick; - signerResolvePage()->setAutoAdvance(quick); - setKeepResultPageOpenWhenDone(!quick); + // always save the setting even if the dialog was canceled (the dialog's result + // is always Rejected because the result page has no Finish button) + Kleo::Settings settings; + settings.setShowResultsAfterSigningClipboard(keepResultPageOpenWhenDone()); + settings.save(); } - -SignEMailWizard::~SignEMailWizard() {} - diff --git a/src/crypto/gui/signemailwizard.h b/src/crypto/gui/signemailwizard.h index ad7f24541..560ecb525 100644 --- a/src/crypto/gui/signemailwizard.h +++ b/src/crypto/gui/signemailwizard.h @@ -1,41 +1,34 @@ /* -*- mode: c++; c-basic-offset:4 -*- crypto/gui/signemailwizard.h This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include #include namespace Kleo { namespace Crypto { namespace Gui { class SignEMailWizard : public SignEncryptWizard { Q_OBJECT public: explicit SignEMailWizard(QWidget *parent = nullptr, Qt::WindowFlags f = {}); ~SignEMailWizard() override; - - bool quickMode() const; - void setQuickMode(bool quick); - -private: - class Private; - kdtools::pimpl_ptr d; }; } } } diff --git a/src/crypto/signemailcontroller.cpp b/src/crypto/signemailcontroller.cpp index f39976d56..d844378ef 100644 --- a/src/crypto/signemailcontroller.cpp +++ b/src/crypto/signemailcontroller.cpp @@ -1,342 +1,336 @@ /* -*- mode: c++; c-basic-offset:4 -*- crypto/signemailcontroller.cpp This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB SPDX-License-Identifier: GPL-2.0-or-later */ #include #include "signemailcontroller.h" #include "kleopatra_debug.h" #include "signemailtask.h" #include "certificateresolver.h" #include "taskcollection.h" #include #include #include #include -#include "emailoperationspreferences.h" - #include - #include #include #include using namespace Kleo; using namespace Kleo::Crypto; using namespace Kleo::Crypto::Gui; using namespace GpgME; using namespace KMime::Types; class SignEMailController::Private { friend class ::Kleo::Crypto::SignEMailController; SignEMailController *const q; public: explicit Private(Mode m, SignEMailController *qq); ~Private(); private: void slotWizardSignersResolved(); void slotWizardCanceled(); // ### extract to base private: void ensureWizardCreated(); // ### extract to base void ensureWizardVisible(); // ### extract to base void cancelAllJobs(); // ### extract to base void schedule(); // ### extract to base std::shared_ptr takeRunnable(GpgME::Protocol proto); // ### extract to base private: const Mode mode; std::vector< std::shared_ptr > runnable, completed; // ### extract to base std::shared_ptr cms, openpgp; // ### extract to base QPointer wizard; // ### extract to base Protocol protocol; // ### extract to base bool detached : 1; }; SignEMailController::Private::Private(Mode m, SignEMailController *qq) : q(qq), mode(m), runnable(), cms(), openpgp(), wizard(), protocol(UnknownProtocol), detached(false) { } SignEMailController::Private::~Private() {} SignEMailController::SignEMailController(Mode mode, QObject *p) : Controller(p), d(new Private(mode, this)) { } SignEMailController::SignEMailController(const std::shared_ptr &xc, Mode mode, QObject *p) : Controller(xc, p), d(new Private(mode, this)) { } SignEMailController::~SignEMailController() { /// ### extract to base if (d->wizard && !d->wizard->isVisible()) { delete d->wizard; } - //d->wizard->close(); ### ? } SignEMailController::Mode SignEMailController::mode() const { return d->mode; } // ### extract to base void SignEMailController::setProtocol(Protocol proto) { kleo_assert(d->protocol == UnknownProtocol || d->protocol == proto); d->protocol = proto; d->ensureWizardCreated(); d->wizard->setPresetProtocol(proto); } Protocol SignEMailController::protocol() const { return d->protocol; } void SignEMailController::startResolveSigners() { startResolveSigners(std::vector()); } void SignEMailController::startResolveSigners(const std::vector &signers) { const std::vector< std::vector > keys = CertificateResolver::resolveSigners(signers, d->protocol); if (!signers.empty()) { kleo_assert(keys.size() == static_cast(signers.size())); } d->ensureWizardCreated(); d->wizard->setSignersAndCandidates(signers, keys); d->ensureWizardVisible(); } void SignEMailController::setDetachedSignature(bool detached) { kleo_assert(!d->openpgp); kleo_assert(!d->cms); kleo_assert(d->completed.empty()); kleo_assert(d->runnable.empty()); d->detached = detached; } void SignEMailController::Private::slotWizardSignersResolved() { Q_EMIT q->signersResolved(); } // ### extract to base void SignEMailController::Private::slotWizardCanceled() { q->setLastError(gpg_error(GPG_ERR_CANCELED), i18n("User cancel")); q->emitDoneOrError(); } void SignEMailController::setInputAndOutput(const std::shared_ptr &input, const std::shared_ptr &output) { setInputsAndOutputs(std::vector< std::shared_ptr >(1, input), std::vector< std::shared_ptr >(1, output)); } // ### extract to base void SignEMailController::setInputsAndOutputs(const std::vector< std::shared_ptr > &inputs, const std::vector< std::shared_ptr > &outputs) { kleo_assert(!inputs.empty()); kleo_assert(!outputs.empty()); std::vector< std::shared_ptr > tasks; tasks.reserve(inputs.size()); d->ensureWizardCreated(); const std::vector keys = d->wizard->resolvedSigners(); kleo_assert(!keys.empty()); for (unsigned int i = 0, end = inputs.size(); i < end; ++i) { const std::shared_ptr task(new SignEMailTask); task->setInput(inputs[i]); task->setOutput(outputs[i]); task->setSigners(keys); task->setDetachedSignature(d->detached); if (d->mode == ClipboardMode) { if (d->protocol == OpenPGP) { task->setClearsign(true); } else { task->setAsciiArmor(true); } } tasks.push_back(task); } d->runnable.swap(tasks); } // ### extract to base void SignEMailController::start() { std::shared_ptr coll(new TaskCollection); std::vector > tmp; std::copy(d->runnable.begin(), d->runnable.end(), std::back_inserter(tmp)); coll->setTasks(tmp); d->ensureWizardCreated(); d->wizard->setTaskCollection(coll); for (const std::shared_ptr &t : std::as_const(tmp)) { connectTask(t); } d->schedule(); } // ### extract to base void SignEMailController::Private::schedule() { if (!cms) if (const std::shared_ptr t = takeRunnable(CMS)) { t->start(); cms = t; } if (!openpgp) if (const std::shared_ptr t = takeRunnable(OpenPGP)) { t->start(); openpgp = t; } if (!cms && !openpgp) { kleo_assert(runnable.empty()); QPointer Q = q; for (const std::shared_ptr &t : completed) { Q_EMIT q->reportMicAlg(t->micAlg()); if (!Q) { return; } } q->emitDoneOrError(); } } // ### extract to base std::shared_ptr SignEMailController::Private::takeRunnable(GpgME::Protocol proto) { const auto it = std::find_if(runnable.begin(), runnable.end(), [proto](const std::shared_ptr &task) { return task->protocol() == proto; }); if (it == runnable.end()) { return std::shared_ptr(); } const std::shared_ptr result = *it; runnable.erase(it); return result; } // ### extract to base void SignEMailController::doTaskDone(const Task *task, const std::shared_ptr &result) { Q_UNUSED(result) Q_ASSERT(task); // We could just delete the tasks here, but we can't use // Qt::QueuedConnection here (we need sender()) and other slots // might not yet have executed. Therefore, we push completed tasks // into a burial container if (task == d->cms.get()) { d->completed.push_back(d->cms); d->cms.reset(); } else if (task == d->openpgp.get()) { d->completed.push_back(d->openpgp); d->openpgp.reset(); } QTimer::singleShot(0, this, SLOT(schedule())); } // ### extract to base void SignEMailController::cancel() { try { if (d->wizard) { d->wizard->close(); } d->cancelAllJobs(); } catch (const std::exception &e) { qCDebug(KLEOPATRA_LOG) << "Caught exception: " << e.what(); } } // ### extract to base void SignEMailController::Private::cancelAllJobs() { // we just kill all runnable tasks - this will not result in // signal emissions. runnable.clear(); // a cancel() will result in a call to if (cms) { cms->cancel(); } if (openpgp) { openpgp->cancel(); } } // ### extract to base void SignEMailController::Private::ensureWizardCreated() { if (wizard) { return; } std::unique_ptr w(new SignEMailWizard); w->setAttribute(Qt::WA_DeleteOnClose); connect(w.get(), SIGNAL(signersResolved()), q, SLOT(slotWizardSignersResolved()), Qt::QueuedConnection); connect(w.get(), SIGNAL(canceled()), q, SLOT(slotWizardCanceled()), Qt::QueuedConnection); w->setPresetProtocol(protocol); - EMailOperationsPreferences prefs; - w->setQuickMode(prefs.quickSignEMail()); wizard = w.release(); } // ### extract to base void SignEMailController::Private::ensureWizardVisible() { ensureWizardCreated(); q->bringToForeground(wizard); } #include "moc_signemailcontroller.cpp" diff --git a/src/kcfg/settings.kcfg b/src/kcfg/settings.kcfg index f2a83a0dd..de8806e8c 100644 --- a/src/kcfg/settings.kcfg +++ b/src/kcfg/settings.kcfg @@ -1,170 +1,182 @@ This text will be used as placeholder text for the common name (CN) field of S/MIME certificates. If true, then the common name (CN) field of S/MIME certificates will be prefilled with information gathered from the system, e.g., from the email settings of the desktop or, on Windows, from the Active Directory. true This text will be used as placeholder text for the email address field of OpenPGP and S/MIME certificates. If true, then the email address field of OpenPGP and S/MIME certificates will be prefilled with information gathered from the system, e.g., from the email settings of the desktop or, on Windows, from the Active Directory. true This text will be used as placeholder text for the name field of OpenPGP certificates. If true, then the name field of OpenPGP certificates will be prefilled with information gathered from the system, e.g., from the email settings of the desktop or, on Windows, from the Active Directory. true Specifies the default validity period of new OpenPGP keys in days. This setting specifies how many days a new OpenPGP key is valid by default, or, in other words, after how many days the key will expire. Set this to 0 for unlimited validity. If this setting is not set or if it is set to a negative value, then new OpenPGP keys will be valid for two years (possibly clamped to the allowed minimum or maximum validity period) by default. -1 Specifies the minimum validity period of new OpenPGP keys in days. This setting specifies how many days a new OpenPGP key is valid at least, or, in other words, after how many days the new key will expire at the earliest. 0 Specifies the maximum validity period of new OpenPGP keys in days. This setting specifies how many days a new OpenPGP key is valid at most, or, in other words, after how many days the new key will expire at the latest. If this setting is not set or if it is set to a negative value, then unlimited validity is allowed. -1 If true, hides the advanced settings button in the new certificate wizard. false sha256sum + + + + If true, then the results are shown after successfully signing the clipboard. + true + + + + If true, then the results are shown after successfully encrypting the clipboard. + true + + Enables support for S/MIME (CMS). If false, then Kleopatra's main UI will not offer any functionality related to S/MIME (CMS). true Allows the creation of S/MIME certificate signing requests. If false, then Kleopatra will not offer the creation of S/MIME certificate signing requests. true Allows signing of text or files with S/MIME certificates. If false, then Kleopatra will not offer functionality for creating signatures with S/MIME certificates. true true true true true true true Specifies the display order of the DN attributes of X.509 certificates. Enable usage of groups of keys. Enable usage of groups of keys to create lists of recipients. true If enabled, then Kleopatra will automatically try to retrieve the keys that were used to certify the user ids of newly imported OpenPGP keys. This is useful in combination with trusted introducers. false This is a list of URL schemes that shall be blocked by the application. This can be used to prevent the application from opening external applications for certain URLs. Searches for the certificates belonging the smartcard keys on the configured keyserver. Searches on keyservers regardless of the protocol for the smartcards key, regardless of the keyserver protocol. Default behavior is to only do this for LDAP keyservers. false Automatically load S/MIME certificates from PKCS#15 (CardOS) smartcards If true, then Kleopatra will call gpgsm --learn if a PKCS#15 Smartcard is inserted with unknown certificates. This can take a while and blocks the smartcard while the command is running. true false