Simplified use of CenterOnScreen().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33406 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström
2009-10-01 23:03:48 +00:00
parent edbcbaa631
commit 33eed03081
2 changed files with 1 additions and 19 deletions
+1 -17
View File
@@ -145,7 +145,6 @@ layout_item_for(BView* view)
InstallerWindow::InstallerWindow()
: BWindow(BRect(-2000, -2000, -1800, -1800), "Installer", B_TITLED_WINDOW,
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fNeedsToCenterOnScreen(true),
fEncouragedToSetupPartitions(false),
fDriveSetupLaunched(false),
fInstallStatus(kReadyForInstall),
@@ -269,6 +268,7 @@ InstallerWindow::InstallerWindow()
if (!be_roster->IsRunning(kDeskbarSignature))
SetFlags(Flags() | B_NOT_MINIMIZABLE);
CenterOnScreen();
Show();
fDriveSetupLaunched = be_roster->IsRunning(DRIVESETUP_SIG);
@@ -291,22 +291,6 @@ InstallerWindow::~InstallerWindow()
}
void
InstallerWindow::FrameResized(float width, float height)
{
BWindow::FrameResized(width, height);
if (fNeedsToCenterOnScreen) {
// We have created ourselves off-screen, since the size adoption
// because of the layout management may happen after Show(). We
// assume that the first frame event is because of this adoption and
// move ourselves to the screen center...
fNeedsToCenterOnScreen = false;
CenterOnScreen();
}
}
void
InstallerWindow::MessageReceived(BMessage *msg)
{
-2
View File
@@ -45,7 +45,6 @@ public:
InstallerWindow();
virtual ~InstallerWindow();
virtual void FrameResized(float width, float height);
virtual void MessageReceived(BMessage* message);
virtual bool QuitRequested();
@@ -88,7 +87,6 @@ private:
BButton* fSetupButton;
BButton* fMakeBootableButton;
bool fNeedsToCenterOnScreen;
bool fEncouragedToSetupPartitions;
bool fDriveSetupLaunched;