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
This commit is contained in:
Stephan Aßmus 2010-01-23 14:14:17 +00:00
parent 5266a73520
commit e1453a3e5d

View File

@ -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);