hrev52699 adds 1 changeset to branch 'master'
old head: 02f41b1a7425fc68f67ea7e1d2c804c753171a99
new head: b02e6250e91b7467d6c4a8cc47e682f6d279afca
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=b02e6250e91b+%5E02f41b1a7425
----------------------------------------------------------------------------
b02e6250e91b: Mail: fix layout when resending
When resending a mail, don't put the To-field in the second column
after the From-field as it's done for incoming mail. To- and From-field
are the same layout as for creating a new mail.
Use the member fResending instead of the parameter "resending" the
THeaderView was called with.
Initialize fCcControl in ctor.
[ Humdinger <humdingerb@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev52699
Commit: b02e6250e91b7467d6c4a8cc47e682f6d279afca
URL: https://git.haiku-os.org/haiku/commit/?id=b02e6250e91b
Author: Humdinger <humdingerb@xxxxxxxxx>
Date: Sun Dec 30 08:46:23 2018 UTC
----------------------------------------------------------------------------
1 file changed, 5 insertions(+), 3 deletions(-)
src/apps/mail/Header.cpp | 8 +++++---
----------------------------------------------------------------------------
diff --git a/src/apps/mail/Header.cpp b/src/apps/mail/Header.cpp
index a20c33cb4c..075643ef09 100644
--- a/src/apps/mail/Header.cpp
+++ b/src/apps/mail/Header.cpp
@@ -284,6 +284,7 @@ THeaderView::THeaderView(bool incoming, bool resending,
int32 defaultAccount)
fAccountMenu(NULL),
fAccountID(defaultAccount),
fFromControl(NULL),
+ fCcControl(NULL),
fBccControl(NULL),
fDateControl(NULL),
fIncoming(incoming),
@@ -298,7 +299,7 @@ THeaderView::THeaderView(bool incoming, bool resending,
int32 defaultAccount)
// From accounts menu
BMenuField* fromField = NULL;
- if (!fIncoming || resending) {
+ if (!fIncoming || fResending) {
// And now the "from account" pop-up menu, on the left side,
taking the
// remaining space.
@@ -351,7 +352,7 @@ THeaderView::THeaderView(bool incoming, bool resending,
int32 defaultAccount)
fToLabel = new LabelView(B_TRANSLATE("To:"));
fToControl = new AddressTextControl(B_TRANSLATE("To:"),
new BMessage(TO_FIELD));
- if (fIncoming || resending) {
+ if (fIncoming || fResending) {
fToLabel->SetEnabled(false);
fToControl->SetEditable(false);
fToControl->SetEnabled(false);
@@ -417,7 +418,7 @@ THeaderView::THeaderView(bool incoming, bool resending,
int32 defaultAccount)
layout->AddItem(fFromControl->CreateTextViewLayoutItem(), 1,
row);
}
- if (fIncoming) {
+ if (fIncoming && !fResending) {
layout->AddView(fToLabel, 2, row);
layout->AddView(fToControl, 3, row++);
} else {
@@ -439,6 +440,7 @@ THeaderView::THeaderView(bool incoming, bool resending,
int32 defaultAccount)
layout->AddView(fCcLabel, 0, row);
layout->AddView(fCcControl, 1, row, 1, 1);
}
+
if (fBccControl != NULL) {
layout->AddView(new LabelView(B_TRANSLATE("Bcc:")), 2, row);
layout->AddView(fBccControl, 3, row++);