From c679d93a10602c37e666be35d1a98fd08218bfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 13 Oct 2009 12:46:30 +0000 Subject: [PATCH] * Correctly evaluate the TMailApp::ShowButtonBar() setting. This fixes bug #4706. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33571 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mail/MailWindow.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp index abc6c6bf0c..c43c79d50f 100644 --- a/src/apps/mail/MailWindow.cpp +++ b/src/apps/mail/MailWindow.cpp @@ -594,7 +594,7 @@ TMailWindow::BuildButtonBar() bbar->AddButton(MDR_DIALECT_CHOICE ("New","新規"), 28, new BMessage(M_NEW)); bbar->AddDivider(5); fButtonBar = bbar; - + if (fResending) { fSendButton = bbar->AddButton(MDR_DIALECT_CHOICE ("Send","送信"), 8, new BMessage(M_SEND_NOW)); @@ -656,7 +656,7 @@ TMailWindow::UpdateViews() float bbwidth = 0, bbheight = 0; float nextY = fMenuBar->Frame().bottom+1; - bool showButtonBar = fApp->ShowButtonBar(); + uint8 showButtonBar = fApp->ShowButtonBar(); // Show/Hide Button Bar if (showButtonBar) { @@ -664,7 +664,7 @@ TMailWindow::UpdateViews() if (!fButtonBar) BuildButtonBar(); - fButtonBar->ShowLabels(showButtonBar); + fButtonBar->ShowLabels(showButtonBar == 1); fButtonBar->Arrange(/* True for all buttons same size, false to just fit */ MDR_DIALECT_CHOICE (true, true)); fButtonBar->GetPreferredSize( &bbwidth, &bbheight); @@ -675,8 +675,7 @@ TMailWindow::UpdateViews() fButtonBar->Show(); else fButtonBar->Invalidate(); - - } else if (fButtonBar) + } else if (fButtonBar && !fButtonBar->IsHidden()) fButtonBar->Hide(); // Arange other views to match @@ -698,7 +697,7 @@ void TMailWindow::UpdatePreferences() { fAutoMarkRead = fApp->AutoMarkRead(); - + _UpdateReadButton(); } @@ -2866,7 +2865,7 @@ TMailWindow::OpenMessage(entry_ref *ref, uint32 characterSetForDecoding) fContentView->fTextView->SetText("", (int32)0); fContentView->fTextView->LoadMessage(fMail, false, NULL); - + if (fApp->ShowButtonBar()) _UpdateReadButton(); } @@ -3129,7 +3128,7 @@ TMailWindow::_AddReadButton() newMail = true; } } - + int32 buttonIndex = fButtonBar->IndexOf(fNextButton); if (newMail) fReadButton = fButtonBar->AddButton(