Bug fixes. Forgot to call method in MessageRecieved(). Align buttons correctly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20126 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e72d32c89b
commit
a004ea09b0
@ -67,7 +67,7 @@ AddPrinterDialog::MessageReceived(BMessage* msg)
|
||||
break;
|
||||
|
||||
case kTransportSelectedMsg:
|
||||
|
||||
HandleChangedTransport(msg);
|
||||
break;
|
||||
|
||||
|
||||
@ -231,7 +231,6 @@ AddPrinterDialog::BuildGUI(int stage)
|
||||
|
||||
// add a "OK" button, and make it default
|
||||
fOk = new BButton(r, NULL, "Add", new BMessage(B_OK), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||
fOk->MakeDefault(true);
|
||||
fOk->ResizeToPreferred();
|
||||
fOk->GetPreferredSize(&w, &h);
|
||||
// put the ok bottom at bottom right corner
|
||||
@ -239,7 +238,6 @@ AddPrinterDialog::BuildGUI(int stage)
|
||||
float y = panel->Bounds().bottom - h - kVMargin;
|
||||
fOk->MoveTo(x, y);
|
||||
panel->AddChild(fOk);
|
||||
SetDefaultButton(fOk);
|
||||
|
||||
// add a "Cancel button
|
||||
BButton *cancel = new BButton(r, NULL, "Cancel", new BMessage(B_CANCEL), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||
@ -251,6 +249,9 @@ AddPrinterDialog::BuildGUI(int stage)
|
||||
cancel->MoveTo(x, y);
|
||||
panel->AddChild(cancel);
|
||||
|
||||
SetDefaultButton(fOk);
|
||||
fOk->MakeDefault(true);
|
||||
|
||||
// Auto resize window
|
||||
r.bottom = transportMenuField->Frame().bottom + fOk->Bounds().Height() + 2 * kVMargin;
|
||||
ResizeTo(r.right, r.bottom);
|
||||
|
Loading…
Reference in New Issue
Block a user