From e1453a3e5d3b6b212237cc13b6544e4f1dc2dcc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 23 Jan 2010 14:14:17 +0000 Subject: [PATCH] When running as the only application, ask the user before quitting for confirmation before restarting the computer. (Remember that new users may not even know what the decorator close box does.) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35263 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/installer/InstallerWindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index a96e6ebc23..ca2eb31a3c 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -502,6 +502,18 @@ InstallerWindow::QuitRequested() "Installer window."), TR("OK")))->Go(); return false; } + + if ((Flags() & B_NOT_MINIMIZABLE) != 0) { + // This means Deskbar is not running, i.e. Installer is the only + // thing on the screen and we will reboot the machine once it quits. + if ((new BAlert("reallyQuit", + TR("Are you sure you want to abort the installation and restart " + "the system?"), + TR("Cancel"), TR("Restart system")))->Go() == 0) { + return false; + } + } + _QuitCopyEngine(false); fWorkerThread->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);