[Bug 102001] When composing a new mail the first recp field get the focus - if BCC is activated it gets focused instead of TO

Christian Schaarschmidt <[email protected]>
Newsgroups gmane.comp.kde.devel.kmail
Message-ID <[email protected]>
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=102001         
schaarsc gmx de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From schaarsc gmx de  2007-03-29 22:13 -------
SVN commit 647900 by schaarsc:

set focus to bottom (= empty line)
BUG: 102001


 M  +9 -2      kmcomposewin.cpp  
 M  +1 -1      recipientseditor.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #647899:647900
 @ -1706,6 +1706,7  @
       return;
     }
   mMsg = newMsg;
+  KPIM::IdentityManager * im = kmkernel->identityManager();
 
   mEdtFrom->setText(mMsg->from());
   mEdtReplyTo->setText(mMsg->replyTo());
 @ -1717,6 +1718,7  @
     mRecipientsEditor->setRecipientString( mMsg->to(), Recipient::To );
     mRecipientsEditor->setRecipientString( mMsg->cc(), Recipient::Cc );
     mRecipientsEditor->setRecipientString( mMsg->bcc(), Recipient::Bcc );
+    mRecipientsEditor->setFocusBottom();
   }
   mEdtSubject->setText(mMsg->subject());
 
 @ -1738,10 +1740,14  @
     // make sure the header values are overwritten with the values of the
     // sticky identity (the slot isn't called by the signal for new messages
     // since the identity has already been set before the signal was connected)
-    slotIdentityChanged( mId );
+    uint savedId = mId;
+    if ( !newMsg->headerField("X-KMail-Identity").isEmpty() )
+      mId = newMsg->headerField("X-KMail-Identity").stripWhiteSpace().toUInt();
+    else
+      mId = im->defaultIdentity().uoid();
+    slotIdentityChanged( savedId );
   }
 
-  KPIM::IdentityManager * im = kmkernel->identityManager();
 
   const KPIM::Identity & ident = im->identityForUoid( mIdentity->currentIdentity() );
 
 @ -4330,6 +4336,7  @
     if ( oldIdentity.bcc() != ident.bcc() ) {
       mRecipientsEditor->removeRecipient( oldIdentity.bcc(), Recipient::Bcc );
       mRecipientsEditor->addRecipient( ident.bcc(), Recipient::Bcc );
+      mRecipientsEditor->setFocusBottom();
     }
   }
 
--- branches/KDE/3.5/kdepim/kmail/recipientseditor.cpp #647899:647900
 @ -610,7 +610,7  @
     ++it;
   }
   if ( line )
-    line->clear();
+    line->slotPropagateDeletion();
 }
 
 bool RecipientsView::isModified()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.