[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdepim/kmail
From:       Thomas McGuire <Thomas.McGuire () gmx ! net>
Date:       2008-07-25 23:56:16
Message-ID: 1217030176.524888.9948.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 837908 by tmcguire:

Backport r837883 by tmcguire to the 4.1 branch:

Merged revisions 837719 via svnmerge from 
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim

........
  r837719 | tilladam | 2008-07-25 16:51:51 +0200 (Fri, 25 Jul 2008) | 4 lines
  
  Make the template parser process teh message before it gets passed to the composer, \
when creating new mails via DBus, as Kontact does, for example, when hitting the "New \
Mail" toolbar button. Probably also fixes To and CC header setting, via that \
interface, etc. Simplify logic a bit as well.  
  kolab/issue2921
........



 M  +2 -6      kmkernel.cpp  


--- branches/KDE/4.1/kdepim/kmail/kmkernel.cpp #837907:837908
@@ -612,7 +612,6 @@
                                       const QString &_attachURL)
 {
   KUrl attachURL( _attachURL );
-  KMail::Composer *win = 0;
   KMMessage *msg = new KMMessage;
   KMFolder *folder = 0;
   uint id = 0;
@@ -621,12 +620,8 @@
     //create message with required folder identity
     folder = currentFolder();
     id = folder ? folder->identity() : 0;
-    msg->initHeader( id );
-    win = makeComposer( msg, id );
-  } else {
-    msg->initHeader();
-    win = makeComposer( msg );
   }
+  msg->initHeader( id );
   msg->setCharset( "utf-8" );
   //set basic headers
   if ( !to.isEmpty() ) {
@@ -643,6 +638,7 @@
                          QString(), false, false, false );
   parser.process( NULL, folder );
 
+  KMail::Composer *win = makeComposer( msg, id );
 
   //Add the attachment if we have one
   if ( !attachURL.isEmpty() && attachURL.isValid() ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic