Commit fac7eef6 authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 347707 - email completion blacklist is not easily discoverable

FIXED-IN: 4.14.9
BUG: 347707
parent 453499b6
......@@ -58,6 +58,8 @@ using KPIM::RecentAddresses;
#include <QTextCodec>
#include <QCheckBox>
#include <addressline/blacklistbaloocompletion/blacklistbalooemailcompletiondialog.h>
QString ComposerPage::helpAnchor() const
{
return QString::fromLatin1("configure-composer");
......@@ -505,6 +507,15 @@ ComposerPageGeneralTab::ComposerPageGeneralTab( QWidget * parent )
connect( completionOrderBtn, SIGNAL(clicked()),
this, SLOT(slotConfigureCompletionOrder()) );
groupGridLayout->addWidget( completionOrderBtn, row, 1, 1, 2 );
++row;
// "Configure Completion Order" button
// KF5 add i18n
QPushButton *completionEmailBacklistBtn = new QPushButton( QLatin1String( "Configure Email Blacklist..." ), this );
connect( completionEmailBacklistBtn, SIGNAL(clicked()),
this, SLOT(slotConfigureEmailBlacklist()) );
groupGridLayout->addWidget( completionEmailBacklistBtn, row, 1, 1, 2 );
groupBox->setLayout( groupGridLayout );
vb2->addWidget( groupBox );
......@@ -628,6 +639,17 @@ void ComposerPage::GeneralTab::slotConfigureRecentAddresses()
}
}
void ComposerPage::GeneralTab::slotConfigureEmailBlacklist()
{
QPointer<KPIM::BlackListBalooEmailCompletionDialog> dlg = new KPIM::BlackListBalooEmailCompletionDialog(this);
KSharedConfig::Ptr config = KSharedConfig::openConfig( QLatin1String("kpimbalooblacklist") );
KConfigGroup group( config, "AddressLineEdit" );
const QStringList balooBlackList = group.readEntry( "BalooBackList", QStringList() );
dlg->setEmailBlackList(balooBlackList);
dlg->exec();
delete dlg;
}
void ComposerPage::GeneralTab::slotConfigureCompletionOrder()
{
KLDAP::LdapClientSearch search;
......
......@@ -55,10 +55,10 @@ public:
QString helpAnchor() const;
void save();
protected slots:
private slots:
void slotConfigureRecentAddresses();
void slotConfigureCompletionOrder();
void slotConfigureEmailBlacklist();
private:
void doLoadFromGlobalSettings();
void doResetToDefaultsOther();
......
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