Commit 0dd37f68 authored by Laurent Montel's avatar Laurent Montel 😁

Use dictionary code and not translated dictionary name.

parent f12577d9
......@@ -1720,14 +1720,16 @@ void KMComposeWin::setMessage( const KMime::Message::Ptr &newMsg, bool lastSignS
const bool stickyDictionary = mBtnDictionary->isChecked() && !mIgnoreStickyFields;
if ( !stickyDictionary ) {
QString dictionary;
if ( mMsg->headerByType( "X-KMail-Dictionary" ) ) {
dictionary = mMsg->headerByType( "X-KMail-Dictionary" )->asUnicodeString();
const QString dictionary = mMsg->headerByType( "X-KMail-Dictionary" )->asUnicodeString();
if (!dictionary.isEmpty()) {
mComposerBase->dictionary()->setCurrentByDictionary( dictionary );
}
} else {
dictionary = ident.dictionary();
mComposerBase->dictionary()->setCurrentByDictionaryName( ident.dictionary() );
}
mComposerBase->dictionary()->setCurrentByDictionaryName( dictionary );
}
mEdtReplyTo->setText( mMsg->replyTo()->asUnicodeString() );
......
......@@ -249,7 +249,7 @@ void MessageComposer::ComposerViewBase::send ( MessageComposer::MessageSender::S
m_msg->setHeader( new KMime::Headers::Generic( "X-KMail-Fcc", m_msg.get(), QString::number( m_fccCollection.id() ) , "utf-8" ) );
m_msg->setHeader( new KMime::Headers::Generic( "X-KMail-Identity", m_msg.get(), QString::number( identity.uoid() ), "utf-8" ));
m_msg->setHeader( new KMime::Headers::Generic( "X-KMail-Dictionary", m_msg.get(), m_dictionary->currentDictionaryName(), "utf-8" ));
m_msg->setHeader( new KMime::Headers::Generic( "X-KMail-Dictionary", m_msg.get(), m_dictionary->currentDictionary(), "utf-8" ));
// Save the quote prefix which is used for this message. Each message can have
// a different quote prefix, for example depending on the original sender.
......
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