diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-06-30 20:41:24 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-06-30 20:41:24 -0500 |
commit | f1f9c9b90c6b27b58cddc021281c345de365685b (patch) | |
tree | c1aeef2eb9fd6ab58d6d7a323067617398c6c8bf /kmail/kmcommands.cpp | |
parent | e4cc0ead9fb403ee429406eaaacda0afae5dd006 (diff) | |
download | tdepim-f1f9c9b90c6b27b58cddc021281c345de365685b.tar.gz tdepim-f1f9c9b90c6b27b58cddc021281c345de365685b.zip |
If a message is replied to from an incoming account, and an outgoing account is available with the same name, set that outgoing account as the default transport
This resolves Bug 1239
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r-- | kmail/kmcommands.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index e3be3b119..d4fead489 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -1115,7 +1115,22 @@ KMCommand::Result KMReplyToCommand::execute() if ( !msg || !msg->codec() ) { return Failed; } - KMMessage *reply = msg->createReply( KMail::ReplySmart, mSelection ); + + // Find the account that held the original message + TQString accountName; + KMFolder* parentFolder = msg->parent(); + if (parentFolder) { + KMFolderDir* parentFolderDir = parentFolder->parent(); + while (parentFolderDir) { + TQString prettyURL = parentFolderDir->prettyURL(); + if (prettyURL != "") { + accountName = prettyURL; + } + parentFolderDir = parentFolderDir->parent(); + } + } + + KMMessage *reply = msg->createReply( KMail::ReplySmart, mSelection, false, true, TQString(), accountName ); KMail::Composer * win = KMail::makeComposer( reply ); win->setCharset( msg->codec()->mimeName(), true ); win->setReplyFocus(); |