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