Add warning about filteractiondecrypt

There was a warning for the encrypt action but not for the
decrypt action. It should be warned that end-to-end encryption
no longer exists if the decrypted mails are stored in a
remote resource.
parent 56268cc1
......@@ -21,6 +21,7 @@
#include "mailcommon_debug.h"
#include "util/cryptoutils.h"
#include <KColorScheme>
#include <KLocalizedString>
#include <KMime/Message>
......@@ -29,6 +30,9 @@
#include <Akonadi/KMime/MessageFlags>
#include <QLabel>
#include <QVBoxLayout>
using namespace MailCommon;
FilterActionDecrypt::FilterActionDecrypt(QObject *parent)
......@@ -89,3 +93,24 @@ FilterAction::ReturnCode FilterActionDecrypt::process(ItemContext &context, bool
context.setNeedsFlagStore();
return GoOn;
}
QWidget *FilterActionDecrypt::createParamWidget(QWidget *parent) const
{
auto w = new QWidget(parent);
auto l = new QVBoxLayout;
w->setLayout(l);
auto lbl = new QLabel(w);
auto palette = lbl->palette();
palette.setColor(lbl->foregroundRole(), KColorScheme(QPalette::Normal).foreground(KColorScheme::NegativeText).color());
lbl->setPalette(palette);
lbl->setWordWrap(true);
lbl->setText(i18n("<b>Warning:</b> Decrypted emails may be uploaded to a server!"));
lbl->setToolTip(i18n("<p>If the email folder that you are filtering into is connected to a remote "
"account (like an IMAP-Server) the decrypted content will go there.</p>"));
l->addWidget(lbl);
return w;
}
......@@ -39,6 +39,8 @@ public:
SearchRule::RequiredPart requiredPart() const override;
FilterAction::ReturnCode process(ItemContext &context, bool applyOnOutbound) const override;
QWidget *createParamWidget(QWidget *parent) const override;
};
} // namespace MailCommon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment