From 53ad1814cbc0e22ec7c6a82725cbe5f791205a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 8 Jun 2008 12:09:10 +0000 Subject: [PATCH] * show EULA before the Installer window * this fixes #2332 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25860 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/installer/InstallerApp.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index 79fade6e3b..7dcfe85f9d 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -28,11 +28,7 @@ int main(int, char **) InstallerApp::InstallerApp() : BApplication(APP_SIG) { - BRect windowFrame(0, 0, INSTALLER_RIGHT, 160); BRect frame = BScreen().Frame(); - windowFrame.OffsetBy((frame.Width() - windowFrame.Width()) / 2, - frame.Height() / 2 - windowFrame.Height() / 4 - 113); - fWindow = new InstallerWindow(windowFrame); // show the EULA BAlert *alert = new BAlert("", EULA_TEXT, " Disagree ", " Agree ", NULL, @@ -51,8 +47,15 @@ InstallerApp::InstallerApp() alertFrame.OffsetTo((frame.Width() - alertFrame.Width()) / 2, (frame.Height() - alertFrame.Height()) / 2); alert->MoveTo(alertFrame.LeftTop()); - if (alert->Go() != 1) + if (alert->Go() != 1) { PostMessage(B_QUIT_REQUESTED); + return; + } + + BRect windowFrame(0, 0, INSTALLER_RIGHT, 160); + windowFrame.OffsetBy((frame.Width() - windowFrame.Width()) / 2, + frame.Height() / 2 - windowFrame.Height() / 4 - 113); + fWindow = new InstallerWindow(windowFrame); } void