From a3aa69055faa498c7620edc5bc76200f7d3d5f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 19 Nov 2007 11:15:04 +0000 Subject: [PATCH] * enabled status of "Save As Draft" menu item should now be correctly maintained git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22954 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mail/MailWindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp index 81a81ec2e1..ba8b0a013d 100644 --- a/src/apps/mail/MailWindow.cpp +++ b/src/apps/mail/MailWindow.cpp @@ -833,10 +833,14 @@ TMailWindow::MenusBeginning() BTextView *textView; if (!fIncoming) { - enable = strlen(fHeaderView->fTo->Text()) - || strlen(fHeaderView->fBcc->Text()); - fSendNow->SetEnabled(enable); - fSendLater->SetEnabled(enable); + bool gotToField = fHeaderView->fTo->Text()[0] != 0; + bool gotCcField = fHeaderView->fCc->Text()[0] != 0; + bool gotBccField = fHeaderView->fBcc->Text()[0] != 0; + bool gotSubjectField = fHeaderView->fSubject->Text()[0] != 0; + bool gotText = fContentView->fTextView->Text()[0] != 0; + fSendNow->SetEnabled(gotToField || gotBccField); + fSendLater->SetEnabled(fChanged && (gotToField || gotCcField + || gotBccField || gotSubjectField || gotText)); be_clipboard->Lock(); fPaste->SetEnabled(be_clipboard->Data()->HasData("text/plain", B_MIME_TYPE)