Changeset View
Changeset View
Standalone View
Standalone View
kmail/editor/kmcomposewin.cpp
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Line(s) | 256 | { | |||
---|---|---|---|---|---|
291 | mHeadersToEditorSplitter->setSizes(defaultSizes); | 291 | mHeadersToEditorSplitter->setSizes(defaultSizes); | ||
292 | 292 | | |||
293 | QVBoxLayout *v = new QVBoxLayout(mMainWidget); | 293 | QVBoxLayout *v = new QVBoxLayout(mMainWidget); | ||
294 | v->setMargin(0); | 294 | v->setMargin(0); | ||
295 | v->addWidget(mHeadersToEditorSplitter); | 295 | v->addWidget(mHeadersToEditorSplitter); | ||
296 | KIdentityManagement::IdentityCombo *identity = new KIdentityManagement::IdentityCombo(kmkernel->identityManager(), | 296 | KIdentityManagement::IdentityCombo *identity = new KIdentityManagement::IdentityCombo(kmkernel->identityManager(), | ||
297 | mHeadersArea); | 297 | mHeadersArea); | ||
298 | identity->setToolTip(i18n("Select an identity for this message")); | 298 | identity->setToolTip(i18n("Select an identity for this message")); | ||
299 | identity->setCurrentIdentity(mId); | ||||
299 | mComposerBase->setIdentityCombo(identity); | 300 | mComposerBase->setIdentityCombo(identity); | ||
300 | 301 | | |||
301 | sigController->setIdentityCombo(identity); | 302 | sigController->setIdentityCombo(identity); | ||
302 | sigController->suspend(); // we have to do identity change tracking ourselves due to the template code | 303 | sigController->suspend(); // we have to do identity change tracking ourselves due to the template code | ||
303 | 304 | | |||
304 | Sonnet::DictionaryComboBox *dictionaryCombo = new DictionaryComboBox(mHeadersArea); | 305 | Sonnet::DictionaryComboBox *dictionaryCombo = new DictionaryComboBox(mHeadersArea); | ||
305 | dictionaryCombo->setToolTip(i18n("Select the dictionary to use when spell-checking this message")); | 306 | dictionaryCombo->setToolTip(i18n("Select the dictionary to use when spell-checking this message")); | ||
306 | mComposerBase->setDictionary(dictionaryCombo); | 307 | mComposerBase->setDictionary(dictionaryCombo); | ||
▲ Show 20 Lines • Show All 1059 Lines • ▼ Show 20 Line(s) | 1355 | if (guiFactory()) { | |||
1366 | } | 1367 | } | ||
1367 | } | 1368 | } | ||
1368 | } | 1369 | } | ||
1369 | 1370 | | |||
1370 | void KMComposeWin::changeCryptoAction() | 1371 | void KMComposeWin::changeCryptoAction() | ||
1371 | { | 1372 | { | ||
1372 | const KIdentityManagement::Identity &ident = | 1373 | const KIdentityManagement::Identity &ident = | ||
1373 | KMKernel::self()->identityManager()->identityForUoidOrDefault(mComposerBase->identityCombo()->currentIdentity()); | 1374 | KMKernel::self()->identityManager()->identityForUoidOrDefault(mComposerBase->identityCombo()->currentIdentity()); | ||
1375 | | ||||
1374 | if (!Kleo::CryptoBackendFactory::instance()->openpgp() && !Kleo::CryptoBackendFactory::instance()->smime()) { | 1376 | if (!Kleo::CryptoBackendFactory::instance()->openpgp() && !Kleo::CryptoBackendFactory::instance()->smime()) { | ||
1375 | // no crypto whatsoever | 1377 | // no crypto whatsoever | ||
1376 | mEncryptAction->setEnabled(false); | 1378 | mEncryptAction->setEnabled(false); | ||
1377 | setEncryption(false); | 1379 | setEncryption(false); | ||
1378 | mSignAction->setEnabled(false); | 1380 | mSignAction->setEnabled(false); | ||
1379 | setSigning(false); | 1381 | setSigning(false); | ||
1380 | } else { | 1382 | } else { | ||
1381 | const bool canOpenPGPSign = Kleo::CryptoBackendFactory::instance()->openpgp() && | 1383 | const bool canOpenPGPSign = Kleo::CryptoBackendFactory::instance()->openpgp() && | ||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 1508 | if (newMsg->headerByType("X-KMail-Identity") && | |||
1513 | // load the mId into the gui, without emitting | 1515 | // load the mId into the gui, without emitting | ||
1514 | mComposerBase->identityCombo()->setCurrentIdentity(newId); | 1516 | mComposerBase->identityCombo()->setCurrentIdentity(newId); | ||
1515 | connect(mComposerBase->identityCombo(), SIGNAL(identityChanged(uint)), | 1517 | connect(mComposerBase->identityCombo(), SIGNAL(identityChanged(uint)), | ||
1516 | this, SLOT(slotIdentityChanged(uint))); | 1518 | this, SLOT(slotIdentityChanged(uint))); | ||
1517 | 1519 | | |||
1518 | // manually load the identity's value into the fields | 1520 | // manually load the identity's value into the fields | ||
1519 | slotIdentityChanged(newId, true /*initalChange*/); | 1521 | slotIdentityChanged(newId, true /*initalChange*/); | ||
1520 | 1522 | | |||
1523 | // Fixing the identitis with auto signing activated | ||||
1524 | mLastSignActionState = mSignAction->isChecked(); | ||||
1521 | } | 1525 | } | ||
1522 | 1526 | | |||
1523 | const KIdentityManagement::Identity &ident = im->identityForUoid(mComposerBase->identityCombo()->currentIdentity()); | 1527 | const KIdentityManagement::Identity &ident = im->identityForUoid(mComposerBase->identityCombo()->currentIdentity()); | ||
1524 | 1528 | | |||
1525 | // check for the presence of a DNT header, indicating that MDN's were requested | 1529 | // check for the presence of a DNT header, indicating that MDN's were requested | ||
1526 | if (auto hdr = newMsg->headerByType("Disposition-Notification-To")) { | 1530 | if (auto hdr = newMsg->headerByType("Disposition-Notification-To")) { | ||
1527 | QString mdnAddr = hdr->asUnicodeString(); | 1531 | QString mdnAddr = hdr->asUnicodeString(); | ||
1528 | mRequestMDNAction->setChecked((!mdnAddr.isEmpty() && | 1532 | mRequestMDNAction->setChecked((!mdnAddr.isEmpty() && | ||
▲ Show 20 Lines • Show All 1708 Lines • Show Last 20 Lines |