* Patch by Ziyu Yu. The bootman window doesn't need to be resizable.
Fixed ticket #2330. * Additionally, I fixed the bootman window popping up at some place and then centering. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29734 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a27b5524c8
commit
661d0430d0
@ -22,8 +22,7 @@
|
||||
|
||||
BootManagerWindow::BootManagerWindow()
|
||||
: BWindow(BRect(100, 100, 500, 400), "Boot Manager", B_TITLED_WINDOW,
|
||||
B_ASYNCHRONOUS_CONTROLS)
|
||||
, fWindowCentered(false)
|
||||
B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE | B_NOT_ZOOMABLE )
|
||||
{
|
||||
float minWidth, maxWidth, minHeight, maxHeight;
|
||||
GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
||||
@ -35,6 +34,8 @@ BootManagerWindow::BootManagerWindow()
|
||||
fController.Initialize(fWizardView);
|
||||
|
||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
||||
|
||||
_CenterWindow();
|
||||
}
|
||||
|
||||
|
||||
@ -73,20 +74,9 @@ BootManagerWindow::QuitRequested()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BootManagerWindow::WindowActivated(bool active)
|
||||
{
|
||||
_CenterWindow();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BootManagerWindow::_CenterWindow()
|
||||
{
|
||||
if (fWindowCentered)
|
||||
return;
|
||||
fWindowCentered = true;
|
||||
|
||||
BScreen screen(this);
|
||||
if (!screen.IsValid())
|
||||
return;
|
||||
|
@ -24,14 +24,10 @@ public:
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual bool QuitRequested();
|
||||
|
||||
virtual void WindowActivated(bool active);
|
||||
|
||||
private:
|
||||
|
||||
void _CenterWindow();
|
||||
|
||||
bool fWindowCentered;
|
||||
|
||||
BootManagerController fController;
|
||||
WizardView* fWizardView;
|
||||
};
|
||||
|
@ -13,6 +13,7 @@ Application bootman :
|
||||
FileSelectionPage.cpp
|
||||
LegacyBootDrive.cpp
|
||||
PartitionsPage.cpp
|
||||
# TestBootDrive.cpp
|
||||
UninstallPage.cpp
|
||||
WizardController.cpp
|
||||
WizardPageView.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user