[haiku-commits] r35263 - haiku/trunk/src/apps/installer

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 23 Jan 2010 15:14:17 +0100 (CET)

Author: stippi
Date: 2010-01-23 15:14:17 +0100 (Sat, 23 Jan 2010)
New Revision: 35263
Changeset: http://dev.haiku-os.org/changeset/35263/haiku

Modified:
   haiku/trunk/src/apps/installer/InstallerWindow.cpp
Log:
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.)


Modified: haiku/trunk/src/apps/installer/InstallerWindow.cpp
===================================================================
--- haiku/trunk/src/apps/installer/InstallerWindow.cpp  2010-01-23 14:01:04 UTC 
(rev 35262)
+++ haiku/trunk/src/apps/installer/InstallerWindow.cpp  2010-01-23 14:14:17 UTC 
(rev 35263)
@@ -502,6 +502,18 @@
                        "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);


Other related posts: