Check a menu item is actually marked, just to be safe.

Remove leftover commented code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41267 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2011-04-19 10:03:02 +00:00
parent 8859d46e56
commit 6e5af4cdc4

View File

@ -2547,16 +2547,14 @@ TMailWindow::SaveAsDraft()
WriteAttrString(&draft, B_MAIL_ATTR_BCC, fHeaderView->fBcc->Text());
// Add account
//BMenuItem* accountItem = fHeaderView->fAccountMenu->FindMarked();
//WriteAttrString(&draft, B_MAIL_ATTR_ACCOUNT, accountItem->Label());
WriteAttrString(&draft, B_MAIL_ATTR_ACCOUNT,
fHeaderView->fAccountMenu->FindMarked()->Label());
BMenuItem* menuItem = fHeaderView->fAccountMenu->FindMarked();
if (menuItem != NULL)
WriteAttrString(&draft, B_MAIL_ATTR_ACCOUNT, menuItem->Label());
// Add encoding
//BMenuItem* encodingItem = fHeaderView->fEncodingMenu->FindMarked();
//WriteAttrString(&draft, "MAIL:encoding", encodingItem->Label());
WriteAttrString(&draft, "MAIL:encoding",
fHeaderView->fEncodingMenu->FindMarked()->Label());
menuItem = fHeaderView->fEncodingMenu->FindMarked();
if (menuItem != NULL)
WriteAttrString(&draft, "MAIL:encoding", menuItem->Label());
// Add the draft attribute for indexing
uint32 draftAttr = true;