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:
@@ -145,7 +145,6 @@ layout_item_for(BView* view)
|
|||||||
InstallerWindow::InstallerWindow()
|
InstallerWindow::InstallerWindow()
|
||||||
: BWindow(BRect(-2000, -2000, -1800, -1800), "Installer", B_TITLED_WINDOW,
|
: BWindow(BRect(-2000, -2000, -1800, -1800), "Installer", B_TITLED_WINDOW,
|
||||||
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
|
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
|
||||||
fNeedsToCenterOnScreen(true),
|
|
||||||
fEncouragedToSetupPartitions(false),
|
fEncouragedToSetupPartitions(false),
|
||||||
fDriveSetupLaunched(false),
|
fDriveSetupLaunched(false),
|
||||||
fInstallStatus(kReadyForInstall),
|
fInstallStatus(kReadyForInstall),
|
||||||
@@ -269,6 +268,7 @@ InstallerWindow::InstallerWindow()
|
|||||||
if (!be_roster->IsRunning(kDeskbarSignature))
|
if (!be_roster->IsRunning(kDeskbarSignature))
|
||||||
SetFlags(Flags() | B_NOT_MINIMIZABLE);
|
SetFlags(Flags() | B_NOT_MINIMIZABLE);
|
||||||
|
|
||||||
|
CenterOnScreen();
|
||||||
Show();
|
Show();
|
||||||
|
|
||||||
fDriveSetupLaunched = be_roster->IsRunning(DRIVESETUP_SIG);
|
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
|
void
|
||||||
InstallerWindow::MessageReceived(BMessage *msg)
|
InstallerWindow::MessageReceived(BMessage *msg)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public:
|
|||||||
InstallerWindow();
|
InstallerWindow();
|
||||||
virtual ~InstallerWindow();
|
virtual ~InstallerWindow();
|
||||||
|
|
||||||
virtual void FrameResized(float width, float height);
|
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
|
|
||||||
@@ -88,7 +87,6 @@ private:
|
|||||||
BButton* fSetupButton;
|
BButton* fSetupButton;
|
||||||
BButton* fMakeBootableButton;
|
BButton* fMakeBootableButton;
|
||||||
|
|
||||||
bool fNeedsToCenterOnScreen;
|
|
||||||
bool fEncouragedToSetupPartitions;
|
bool fEncouragedToSetupPartitions;
|
||||||
|
|
||||||
bool fDriveSetupLaunched;
|
bool fDriveSetupLaunched;
|
||||||
|
|||||||
Reference in New Issue
Block a user