Commit 6b77c684 authored by Sandro Knauß's avatar Sandro Knauß 🐝
Browse files

Adpot kidentity settings.

parent 5770f2bd
......@@ -49,7 +49,7 @@ set(KDEPIM_VERSION "${PIM_VERSION}${KDEPIM_DEV_VERSION} (${RELEASE_SERVICE_VERSI
set(AKONADI_MIMELIB_VERSION "5.21.40")
set(AKONADI_CONTACT_VERSION "5.21.40")
set(CALENDARUTILS_LIB_VERSION "5.21.40")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.21.40")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.21.41")
set(KLDAP_LIB_VERSION "5.21.40")
set(KMAILTRANSPORT_LIB_VERSION "5.21.40")
set(KONTACTINTERFACE_LIB_VERSION "5.21.40")
......
......@@ -454,26 +454,25 @@ IdentityDialog::IdentityDialog(QWidget *parent)
mAutocryptPrefer = new QCheckBox(i18n("Let others know you prefer encryption"));
vlay->addWidget(mAutocryptPrefer);
auto groupBox = new QGroupBox(i18n("Overwrite global settings for security defaults"));
groupBox->setCheckable(true);
groupBox->setChecked(false);
mOverrideDefault = new QGroupBox(i18n("Overwrite global settings for security defaults"));
mOverrideDefault->setCheckable(true);
mOverrideDefault->setChecked(false);
label = new QLabel(i18n("Overwrite defaults:"), tab);
formLayout->addRow(label, groupBox);
formLayout->addRow(label, mOverrideDefault);
vlay = new QVBoxLayout(groupBox);
vlay = new QVBoxLayout(mOverrideDefault);
mAutoSign = new QCheckBox(i18n("Automatically sign messages"));
mAutoSign = new QCheckBox(i18n("Sign messages"));
vlay->addWidget(mAutoSign);
mAutoEncrypt = new QCheckBox(i18n("Automatically encrypt messages when possible"));
mAutoEncrypt = new QCheckBox(i18n("Encrypt messages when possible"));
vlay->addWidget(mAutoEncrypt);
auto checkBox = new QCheckBox(i18n("Warn when trying to send unsigned messages"));
vlay->addWidget(checkBox);
checkBox = new QCheckBox(i18n("Warn when trying to send unencrypted messages"));
vlay->addWidget(checkBox);
mWarnNotSign = new QCheckBox(i18n("Warn when trying to send unsigned messages"));
vlay->addWidget(mWarnNotSign);
mWarnNotEncrypt = new QCheckBox(i18n("Warn when trying to send unencrypted messages"));
vlay->addWidget(mWarnNotEncrypt);
//
// Tab Widget: Advanced
......@@ -862,8 +861,19 @@ void IdentityDialog::setIdentity(KIdentityManagement::Identity &ident)
mPreferredCryptoMessageFormat->setCurrentIndex(format2cb(Kleo::stringToCryptoMessageFormat(ident.preferredCryptoMessageFormat())));
mAutocrypt->setChecked(ident.autocryptEnabled());
mAutoSign->setChecked(ident.pgpAutoSign());
mAutoEncrypt->setChecked(ident.pgpAutoEncrypt());
mAutocryptPrefer->setChecked(ident.autocryptPrefer());
mOverrideDefault->setChecked(ident.encryptionOverride());
if (!ident.encryptionOverride()) {
mAutoSign->setChecked(ident.pgpAutoSign());
mAutoEncrypt->setChecked(ident.pgpAutoEncrypt());
mWarnNotSign->setChecked(ident.warnNotSign());
mWarnNotEncrypt->setChecked(ident.warnNotEncrypt());
} else {
mAutoEncrypt->setChecked(MessageComposer::MessageComposerSettings::self()->cryptoAutoEncrypt());
mAutoSign->setChecked(MessageComposer::MessageComposerSettings::self()->cryptoAutoSign());
mWarnNotEncrypt->setChecked(MessageComposer::MessageComposerSettings::self()->cryptoWarningUnencrypted());
mWarnNotSign->setChecked(MessageComposer::MessageComposerSettings::self()->cryptoWarningUnsigned());
}
// "Advanced" tab:
mReplyToEdit->setText(ident.replyToAddr());
......@@ -983,8 +993,12 @@ void IdentityDialog::updateIdentity(KIdentityManagement::Identity &ident)
ident.setSMIMEEncryptionKey(mSMIMEEncryptionKeyRequester->currentKey().primaryFingerprint());
ident.setPreferredCryptoMessageFormat(QLatin1String(Kleo::cryptoMessageFormatToString(cb2format(mPreferredCryptoMessageFormat->currentIndex()))));
ident.setAutocryptEnabled(mAutocrypt->isChecked());
ident.setAutocryptPrefer(mAutocryptPrefer->isChecked());
ident.setEncryptionOverride(mOverrideDefault->isChecked());
ident.setPgpAutoSign(mAutoSign->isChecked());
ident.setPgpAutoEncrypt(mAutoEncrypt->isChecked());
ident.setWarnNotEncrypt(mWarnNotEncrypt->isChecked());
ident.setWarnNotEncrypt(mWarnNotEncrypt->isChecked());
// "Advanced" tab:
ident.setReplyToAddr(mReplyToEdit->text());
ident.setBcc(mBccEdit->text());
......
......@@ -108,8 +108,12 @@ private:
QComboBox *mPreferredCryptoMessageFormat = nullptr;
QGroupBox *mAutocrypt = nullptr;
QCheckBox *mAutocryptPrefer = nullptr;
QGroupBox *mOverrideDefault = nullptr;
QCheckBox *mPGPSameKey = nullptr;
QCheckBox *mAutoSign = nullptr;
QCheckBox *mAutoEncrypt = nullptr;
QCheckBox *mWarnNotEncrypt = nullptr;
QCheckBox *mWarnNotSign = nullptr;
// "advanced" tab:
QLineEdit *mReplyToEdit = nullptr;
QLineEdit *mBccEdit = nullptr;
......
Supports Markdown
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