From 661d0430d07e5f76ae1ce87f3e0b3d6e68bfe5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 26 Mar 2009 15:59:21 +0000 Subject: [PATCH] * 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 --- src/apps/bootman/BootManagerWindow.cpp | 16 +++------------- src/apps/bootman/BootManagerWindow.h | 4 ---- src/apps/bootman/Jamfile | 1 + 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/apps/bootman/BootManagerWindow.cpp b/src/apps/bootman/BootManagerWindow.cpp index a89976c5e5..f90db94c65 100644 --- a/src/apps/bootman/BootManagerWindow.cpp +++ b/src/apps/bootman/BootManagerWindow.cpp @@ -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; diff --git a/src/apps/bootman/BootManagerWindow.h b/src/apps/bootman/BootManagerWindow.h index 39cd2b11b2..ea137c9806 100644 --- a/src/apps/bootman/BootManagerWindow.h +++ b/src/apps/bootman/BootManagerWindow.h @@ -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; }; diff --git a/src/apps/bootman/Jamfile b/src/apps/bootman/Jamfile index 26a748d7b3..24c2564964 100644 --- a/src/apps/bootman/Jamfile +++ b/src/apps/bootman/Jamfile @@ -13,6 +13,7 @@ Application bootman : FileSelectionPage.cpp LegacyBootDrive.cpp PartitionsPage.cpp +# TestBootDrive.cpp UninstallPage.cpp WizardController.cpp WizardPageView.cpp