* 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:
@@ -22,8 +22,7 @@
|
|||||||
|
|
||||||
BootManagerWindow::BootManagerWindow()
|
BootManagerWindow::BootManagerWindow()
|
||||||
: BWindow(BRect(100, 100, 500, 400), "Boot Manager", B_TITLED_WINDOW,
|
: BWindow(BRect(100, 100, 500, 400), "Boot Manager", B_TITLED_WINDOW,
|
||||||
B_ASYNCHRONOUS_CONTROLS)
|
B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE | B_NOT_ZOOMABLE )
|
||||||
, fWindowCentered(false)
|
|
||||||
{
|
{
|
||||||
float minWidth, maxWidth, minHeight, maxHeight;
|
float minWidth, maxWidth, minHeight, maxHeight;
|
||||||
GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
||||||
@@ -35,6 +34,8 @@ BootManagerWindow::BootManagerWindow()
|
|||||||
fController.Initialize(fWizardView);
|
fController.Initialize(fWizardView);
|
||||||
|
|
||||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
|
||||||
|
|
||||||
|
_CenterWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -73,20 +74,9 @@ BootManagerWindow::QuitRequested()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
BootManagerWindow::WindowActivated(bool active)
|
|
||||||
{
|
|
||||||
_CenterWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BootManagerWindow::_CenterWindow()
|
BootManagerWindow::_CenterWindow()
|
||||||
{
|
{
|
||||||
if (fWindowCentered)
|
|
||||||
return;
|
|
||||||
fWindowCentered = true;
|
|
||||||
|
|
||||||
BScreen screen(this);
|
BScreen screen(this);
|
||||||
if (!screen.IsValid())
|
if (!screen.IsValid())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -24,14 +24,10 @@ public:
|
|||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
|
|
||||||
virtual void WindowActivated(bool active);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void _CenterWindow();
|
void _CenterWindow();
|
||||||
|
|
||||||
bool fWindowCentered;
|
|
||||||
|
|
||||||
BootManagerController fController;
|
BootManagerController fController;
|
||||||
WizardView* fWizardView;
|
WizardView* fWizardView;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Application bootman :
|
|||||||
FileSelectionPage.cpp
|
FileSelectionPage.cpp
|
||||||
LegacyBootDrive.cpp
|
LegacyBootDrive.cpp
|
||||||
PartitionsPage.cpp
|
PartitionsPage.cpp
|
||||||
|
# TestBootDrive.cpp
|
||||||
UninstallPage.cpp
|
UninstallPage.cpp
|
||||||
WizardController.cpp
|
WizardController.cpp
|
||||||
WizardPageView.cpp
|
WizardPageView.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user