* 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
This commit is contained in:
@@ -594,7 +594,7 @@ TMailWindow::BuildButtonBar()
|
|||||||
bbar->AddButton(MDR_DIALECT_CHOICE ("New","新規"), 28, new BMessage(M_NEW));
|
bbar->AddButton(MDR_DIALECT_CHOICE ("New","新規"), 28, new BMessage(M_NEW));
|
||||||
bbar->AddDivider(5);
|
bbar->AddDivider(5);
|
||||||
fButtonBar = bbar;
|
fButtonBar = bbar;
|
||||||
|
|
||||||
if (fResending) {
|
if (fResending) {
|
||||||
fSendButton = bbar->AddButton(MDR_DIALECT_CHOICE ("Send","送信"), 8,
|
fSendButton = bbar->AddButton(MDR_DIALECT_CHOICE ("Send","送信"), 8,
|
||||||
new BMessage(M_SEND_NOW));
|
new BMessage(M_SEND_NOW));
|
||||||
@@ -656,7 +656,7 @@ TMailWindow::UpdateViews()
|
|||||||
float bbwidth = 0, bbheight = 0;
|
float bbwidth = 0, bbheight = 0;
|
||||||
float nextY = fMenuBar->Frame().bottom+1;
|
float nextY = fMenuBar->Frame().bottom+1;
|
||||||
|
|
||||||
bool showButtonBar = fApp->ShowButtonBar();
|
uint8 showButtonBar = fApp->ShowButtonBar();
|
||||||
|
|
||||||
// Show/Hide Button Bar
|
// Show/Hide Button Bar
|
||||||
if (showButtonBar) {
|
if (showButtonBar) {
|
||||||
@@ -664,7 +664,7 @@ TMailWindow::UpdateViews()
|
|||||||
if (!fButtonBar)
|
if (!fButtonBar)
|
||||||
BuildButtonBar();
|
BuildButtonBar();
|
||||||
|
|
||||||
fButtonBar->ShowLabels(showButtonBar);
|
fButtonBar->ShowLabels(showButtonBar == 1);
|
||||||
fButtonBar->Arrange(/* True for all buttons same size, false to just fit */
|
fButtonBar->Arrange(/* True for all buttons same size, false to just fit */
|
||||||
MDR_DIALECT_CHOICE (true, true));
|
MDR_DIALECT_CHOICE (true, true));
|
||||||
fButtonBar->GetPreferredSize( &bbwidth, &bbheight);
|
fButtonBar->GetPreferredSize( &bbwidth, &bbheight);
|
||||||
@@ -675,8 +675,7 @@ TMailWindow::UpdateViews()
|
|||||||
fButtonBar->Show();
|
fButtonBar->Show();
|
||||||
else
|
else
|
||||||
fButtonBar->Invalidate();
|
fButtonBar->Invalidate();
|
||||||
|
} else if (fButtonBar && !fButtonBar->IsHidden())
|
||||||
} else if (fButtonBar)
|
|
||||||
fButtonBar->Hide();
|
fButtonBar->Hide();
|
||||||
|
|
||||||
// Arange other views to match
|
// Arange other views to match
|
||||||
@@ -698,7 +697,7 @@ void
|
|||||||
TMailWindow::UpdatePreferences()
|
TMailWindow::UpdatePreferences()
|
||||||
{
|
{
|
||||||
fAutoMarkRead = fApp->AutoMarkRead();
|
fAutoMarkRead = fApp->AutoMarkRead();
|
||||||
|
|
||||||
_UpdateReadButton();
|
_UpdateReadButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2866,7 +2865,7 @@ TMailWindow::OpenMessage(entry_ref *ref, uint32 characterSetForDecoding)
|
|||||||
fContentView->fTextView->SetText("", (int32)0);
|
fContentView->fTextView->SetText("", (int32)0);
|
||||||
|
|
||||||
fContentView->fTextView->LoadMessage(fMail, false, NULL);
|
fContentView->fTextView->LoadMessage(fMail, false, NULL);
|
||||||
|
|
||||||
if (fApp->ShowButtonBar())
|
if (fApp->ShowButtonBar())
|
||||||
_UpdateReadButton();
|
_UpdateReadButton();
|
||||||
}
|
}
|
||||||
@@ -3129,7 +3128,7 @@ TMailWindow::_AddReadButton()
|
|||||||
newMail = true;
|
newMail = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 buttonIndex = fButtonBar->IndexOf(fNextButton);
|
int32 buttonIndex = fButtonBar->IndexOf(fNextButton);
|
||||||
if (newMail)
|
if (newMail)
|
||||||
fReadButton = fButtonBar->AddButton(
|
fReadButton = fButtonBar->AddButton(
|
||||||
|
|||||||
Reference in New Issue
Block a user