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.
wilder
Andre Heinecke 8 years ago
parent 56268cc144
commit 468ffca8d8
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C
  1. 25
      src/filter/filteractions/filteractiondecrypt.cpp
  2. 2
      src/filter/filteractions/filteractiondecrypt.h

@ -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

Loading…
Cancel
Save