[kde-doc-english] [trojita] src/Gui: GUI: place focus on the first sender when composing a new mail and to the body when replying

Jan Kundrát jkt at flaska.net
Mon May 13 10:32:27 UTC 2013


Git commit 46aa5edabd59969b85b817a066735f19f6d4b70c by Jan Kundrát.
Committed on 13/05/2013 at 12:13.
Pushed by jkt into branch 'master'.

GUI: place focus on the first sender when composing a new mail and to the body when replying

Thanks to Sebastian Spaeth <Sebastian at sspaeth.de> for reporting.

fixes #635

M  +2    -0    src/Gui/ComposeWidget.cpp

http://commits.kde.org/trojita/46aa5edabd59969b85b817a066735f19f6d4b70c

diff --git a/src/Gui/ComposeWidget.cpp b/src/Gui/ComposeWidget.cpp
index 2506e1b..224ac35 100644
--- a/src/Gui/ComposeWidget.cpp
+++ b/src/Gui/ComposeWidget.cpp
@@ -296,6 +296,7 @@ void ComposeWidget::setData(const QList<QPair<Composer::RecipientKind, QString>
         addRecipient(i, recipients.at(i).first, recipients.at(i).second);
     }
     updateRecipientList();
+    ui->envelopeLayout->itemAt(OFFSET_OF_FIRST_ADDRESSEE, QFormLayout::FieldRole)->widget()->setFocus();
     ui->subject->setText(subject);
     const bool wasEdited = m_messageEverEdited;
     ui->mailText->setText(body);
@@ -648,6 +649,7 @@ bool ComposeWidget::setReplyMode(const Composer::ReplyMode mode)
     }
 
     updateRecipientList();
+    ui->mailText->setFocus();
 
     return true;
 }



More information about the kde-doc-english mailing list