Index: accountwizard/CMakeLists.txt =================================================================== --- accountwizard/CMakeLists.txt +++ accountwizard/CMakeLists.txt @@ -42,7 +42,7 @@ set(AKONADI_MIMELIB_VERSION "5.2.80") set(AKONADI_CONTACT_VERSION "5.2.80") set(KCONTACTS_LIB_VERSION "5.2.81") - set(IDENTITYMANAGEMENT_LIB_VERSION "5.2.80") + set(IDENTITYMANAGEMENT_LIB_VERSION "5.3.41") set(KLDAP_LIB_VERSION "5.2.80") set(KMAILTRANSPORT_LIB_VERSION "5.2.80") set(KPIMTEXTEDIT_LIB_VERSION "5.2.80") Index: accountwizard/src/identity.h =================================================================== --- accountwizard/src/identity.h +++ accountwizard/src/identity.h @@ -49,6 +49,8 @@ Q_SCRIPTABLE void setTransport(QObject *transport); Q_SCRIPTABLE void setPreferredCryptoMessageFormat(const QString &format); Q_SCRIPTABLE void setXFace(const QString &xface); + Q_SCRIPTABLE void setPgpAutoSign(bool autosign); + Q_SCRIPTABLE void setPgpAutoEncrypt(bool autoencrypt); protected: QString identityName() const; Index: accountwizard/src/identity.cpp =================================================================== --- accountwizard/src/identity.cpp +++ accountwizard/src/identity.cpp @@ -143,3 +143,12 @@ m_identity->setXFace(xface); } +void Identity::setPgpAutoEncrypt(bool autoencrypt) +{ + m_identity->setPgpAutoEncrypt(autoencrypt); +} + +void Identity::setPgpAutoSign(bool autosign) +{ + m_identity->setPgpAutoSign(autosign); +} Index: accountwizard/src/personaldatapage.cpp =================================================================== --- accountwizard/src/personaldatapage.cpp +++ accountwizard/src/personaldatapage.cpp @@ -118,6 +118,11 @@ mSetupManager->setName(ui.nameEdit->text()); mSetupManager->setPassword(ui.passwordEdit->text()); mSetupManager->setEmail(ui.emailEdit->text().trimmed()); + const int cryptoState = ui.comboBox->currentIndex(); + mSetupManager->setPgpAutoEncrypt(cryptoState == 0 || // sign + encrypt + cryptoState == 2); // encrypt only + mSetupManager->setPgpAutoSign(cryptoState == 0 || // sign + encrypt + cryptoState == 1); // sign only if (ui.checkOnlineGroupBox->isChecked()) { // since the user can go back and forth, explicitly disable the man page Index: accountwizard/src/setupmanager.h =================================================================== --- accountwizard/src/setupmanager.h +++ accountwizard/src/setupmanager.h @@ -42,6 +42,8 @@ void setEmail(const QString &); void setPassword(const QString &); void setPersonalDataAvailable(bool available); + void setPgpAutoSign(bool autosign); + void setPgpAutoEncrypt(bool autoencrypt); public Q_SLOTS: Q_SCRIPTABLE bool personalDataAvailable(); @@ -83,6 +85,8 @@ KWallet::Wallet *m_wallet; bool m_personalDataAvailable; bool m_rollbackRequested; + bool m_pgpAutoSign; + bool m_pgpAutoEncrypt; }; #endif Index: accountwizard/src/setupmanager.cpp =================================================================== --- accountwizard/src/setupmanager.cpp +++ accountwizard/src/setupmanager.cpp @@ -41,7 +41,9 @@ m_page(Q_NULLPTR), m_wallet(Q_NULLPTR), m_personalDataAvailable(false), - m_rollbackRequested(false) + m_rollbackRequested(false), + m_pgpAutoSign(false), + m_pgpAutoEncrypt(false) { KEMailSettings e; m_name = e.getSetting(KEMailSettings::RealName); @@ -80,7 +82,12 @@ QObject *SetupManager::createIdentity() { - return connectObject(new Identity(this)); + Identity *identity = new Identity(this); + identity->setEmail(m_email); + identity->setRealName(m_name); + identity->setPgpAutoSign(m_pgpAutoSign); + identity->setPgpAutoEncrypt(m_pgpAutoEncrypt); + return connectObject(identity); } static bool dependencyCompare(SetupObject *left, SetupObject *right) @@ -217,6 +224,16 @@ return QLocale::countryToString(QLocale().country()); } +void SetupManager::setPgpAutoEncrypt(bool autoencrypt) +{ + m_pgpAutoEncrypt = autoencrypt; +} + +void SetupManager::setPgpAutoSign(bool autosign) +{ + m_pgpAutoSign = autosign; +} + void SetupManager::openWallet() { using namespace KWallet; Index: accountwizard/src/ui/personaldatapage.ui =================================================================== --- accountwizard/src/ui/personaldatapage.ui +++ accountwizard/src/ui/personaldatapage.ui @@ -95,6 +95,40 @@ + + + + Security: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Always sign and encrypt outgoing emails + + + + + Always sign outgoing emails + + + + + Always encrypt outgoing emails + + + + + Don't sign or encrypt outgoing emails + + + +