1 | Index: haiku/src/apps/mail/MailWindow.cpp
|
---|
2 | ===================================================================
|
---|
3 | --- haiku/src/apps/mail/MailWindow.cpp (revision 41262)
|
---|
4 | +++ haiku/src/apps/mail/MailWindow.cpp (working copy)
|
---|
5 | @@ -2545,6 +2545,18 @@
|
---|
6 | WriteAttrString(&draft, B_MAIL_ATTR_CC, fHeaderView->fCc->Text());
|
---|
7 | if (fHeaderView->fBcc != NULL)
|
---|
8 | WriteAttrString(&draft, B_MAIL_ATTR_BCC, fHeaderView->fBcc->Text());
|
---|
9 | +
|
---|
10 | + // Add account
|
---|
11 | + //BMenuItem* accountItem = fHeaderView->fAccountMenu->FindMarked();
|
---|
12 | + //WriteAttrString(&draft, B_MAIL_ATTR_ACCOUNT, accountItem->Label());
|
---|
13 | + WriteAttrString(&draft, B_MAIL_ATTR_ACCOUNT,
|
---|
14 | + fHeaderView->fAccountMenu->FindMarked()->Label());
|
---|
15 | +
|
---|
16 | + // Add encoding
|
---|
17 | + //BMenuItem* encodingItem = fHeaderView->fEncodingMenu->FindMarked();
|
---|
18 | + //WriteAttrString(&draft, "MAIL:encoding", encodingItem->Label());
|
---|
19 | + WriteAttrString(&draft, "MAIL:encoding",
|
---|
20 | + fHeaderView->fEncodingMenu->FindMarked()->Label());
|
---|
21 |
|
---|
22 | // Add the draft attribute for indexing
|
---|
23 | uint32 draftAttr = true;
|
---|
24 | @@ -2785,7 +2797,21 @@
|
---|
25 | fHeaderView->fCc->SetText(string.String());
|
---|
26 | if (node.ReadAttrString(B_MAIL_ATTR_BCC, &string) == B_OK)
|
---|
27 | fHeaderView->fBcc->SetText(string.String());
|
---|
28 | -
|
---|
29 | +
|
---|
30 | + // Restore account
|
---|
31 | + if (node.ReadAttrString(B_MAIL_ATTR_ACCOUNT, &string) == B_OK) {
|
---|
32 | + BMenuItem* accountItem = fHeaderView->fAccountMenu->FindItem(string.String());
|
---|
33 | + if (accountItem != NULL)
|
---|
34 | + accountItem->SetMarked(true);
|
---|
35 | + }
|
---|
36 | +
|
---|
37 | + // Restore encoding
|
---|
38 | + if (node.ReadAttrString("MAIL:encoding", &string) == B_OK) {
|
---|
39 | + BMenuItem* encodingItem = fHeaderView->fEncodingMenu->FindItem(string.String());
|
---|
40 | + if (encodingItem != NULL)
|
---|
41 | + encodingItem->SetMarked(true);
|
---|
42 | + }
|
---|
43 | +
|
---|
44 | // Restore attachments
|
---|
45 | if (node.ReadAttrString("MAIL:attachments", &string) == B_OK) {
|
---|
46 | BMessage msg(REFS_RECEIVED);
|
---|
47 | Index: haiku/src/apps/mail/Header.cpp
|
---|
48 | ===================================================================
|
---|
49 | --- haiku/src/apps/mail/Header.cpp (revision 41262)
|
---|
50 | +++ haiku/src/apps/mail/Header.cpp (working copy)
|
---|
51 | @@ -640,6 +653,13 @@
|
---|
52 | int32 account;
|
---|
53 | if (msg->FindInt32("id",(int32 *)&account) >= B_OK)
|
---|
54 | fAccountID = account;
|
---|
55 | +
|
---|
56 | + BMessage message(FIELD_CHANGED);
|
---|
57 | + // field doesn't matter; no special processing for this field
|
---|
58 | + // it's just to turn on the save button
|
---|
59 | + message.AddInt32("bitmask", 0);
|
---|
60 | + Window()->PostMessage(&message, Window());
|
---|
61 | +
|
---|
62 | break;
|
---|
63 | }
|
---|
64 |
|
---|
65 | @@ -654,6 +674,13 @@
|
---|
66 | message.what = CHARSET_CHOICE_MADE;
|
---|
67 | message.AddInt32 ("charset", fCharacterSetUserSees);
|
---|
68 | Window()->PostMessage (&message, Window());
|
---|
69 | +
|
---|
70 | + BMessage message2(FIELD_CHANGED);
|
---|
71 | + // field doesn't matter; no special processing for this field
|
---|
72 | + // it's just to turn on the save button
|
---|
73 | + message2.AddInt32("bitmask", 0);
|
---|
74 | + Window()->PostMessage(&message2, Window());
|
---|
75 | +
|
---|
76 | break;
|
---|
77 | }
|
---|
78 | }
|
---|