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:
@@ -67,7 +67,7 @@ AddPrinterDialog::MessageReceived(BMessage* msg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kTransportSelectedMsg:
|
case kTransportSelectedMsg:
|
||||||
|
HandleChangedTransport(msg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@@ -231,7 +231,6 @@ AddPrinterDialog::BuildGUI(int stage)
|
|||||||
|
|
||||||
// add a "OK" button, and make it default
|
// 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 = new BButton(r, NULL, "Add", new BMessage(B_OK), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||||
fOk->MakeDefault(true);
|
|
||||||
fOk->ResizeToPreferred();
|
fOk->ResizeToPreferred();
|
||||||
fOk->GetPreferredSize(&w, &h);
|
fOk->GetPreferredSize(&w, &h);
|
||||||
// put the ok bottom at bottom right corner
|
// put the ok bottom at bottom right corner
|
||||||
@@ -239,7 +238,6 @@ AddPrinterDialog::BuildGUI(int stage)
|
|||||||
float y = panel->Bounds().bottom - h - kVMargin;
|
float y = panel->Bounds().bottom - h - kVMargin;
|
||||||
fOk->MoveTo(x, y);
|
fOk->MoveTo(x, y);
|
||||||
panel->AddChild(fOk);
|
panel->AddChild(fOk);
|
||||||
SetDefaultButton(fOk);
|
|
||||||
|
|
||||||
// add a "Cancel button
|
// add a "Cancel button
|
||||||
BButton *cancel = new BButton(r, NULL, "Cancel", new BMessage(B_CANCEL), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
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);
|
cancel->MoveTo(x, y);
|
||||||
panel->AddChild(cancel);
|
panel->AddChild(cancel);
|
||||||
|
|
||||||
|
SetDefaultButton(fOk);
|
||||||
|
fOk->MakeDefault(true);
|
||||||
|
|
||||||
// Auto resize window
|
// Auto resize window
|
||||||
r.bottom = transportMenuField->Frame().bottom + fOk->Bounds().Height() + 2 * kVMargin;
|
r.bottom = transportMenuField->Frame().bottom + fOk->Bounds().Height() + 2 * kVMargin;
|
||||||
ResizeTo(r.right, r.bottom);
|
ResizeTo(r.right, r.bottom);
|
||||||
|
|||||||
Reference in New Issue
Block a user