[PC-BSD Commits] r6857 - in pcbsd: current/SysInstaller stable/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Wed Jun 2 13:50:18 PDT 2010


Author: kris
Date: 2010-06-02 13:50:18 -0700 (Wed, 02 Jun 2010)
New Revision: 6857

Modified:
   pcbsd/current/SysInstaller/sys-diskwidget.cpp
   pcbsd/current/SysInstaller/sys-userwidget.cpp
   pcbsd/stable/SysInstaller/sys-diskwidget.cpp
   pcbsd/stable/SysInstaller/sys-userwidget.cpp
Log:

Make swap / users optional via the GUI installer now, but warn the user beforehand, to prevent oversights. 



Modified: pcbsd/current/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/current/SysInstaller/sys-diskwidget.cpp	2010-06-01 22:19:35 UTC (rev 6856)
+++ pcbsd/current/SysInstaller/sys-diskwidget.cpp	2010-06-02 20:50:18 UTC (rev 6857)
@@ -229,10 +229,21 @@
       return false;
     }
     if (!haveSwap) {
-      QMessageBox::critical(this, tr("PC-BSD Installer Error"),
-         tr("Missing SWAP file-system, please add a SWAP file-system to continue."),
-         QMessageBox::Ok);
-      return false;
+      int ret = QMessageBox::warning(this, tr("PC-BSD Install"),
+                                tr("No SWAP space has been setup, are you sure you want to continue?"),
+                                QMessageBox::Yes | QMessageBox::No,
+                                QMessageBox::No);
+      switch (ret) {
+       case QMessageBox::Yes:
+         break;
+       case QMessageBox::No:
+                return false;
+         break;
+       default:
+                return false;
+         break;
+      }
+
     }
 
     if (haveEncryption) {

Modified: pcbsd/current/SysInstaller/sys-userwidget.cpp
===================================================================
--- pcbsd/current/SysInstaller/sys-userwidget.cpp	2010-06-01 22:19:35 UTC (rev 6856)
+++ pcbsd/current/SysInstaller/sys-userwidget.cpp	2010-06-02 20:50:18 UTC (rev 6857)
@@ -234,11 +234,24 @@
   bool ok;
   ok = true;
 
-  // Check if we hav e a username setup.
+  // Check if we have a username setup.
   if ( listUsers.empty() )
   {
-      textAcctNotify->setText(tr("You must setup at least one username to continue. "));
-      ok = false;
+      int ret = QMessageBox::warning(this, tr("PC-BSD Install"),
+                                tr("No usernames have been specified. Are you sure you want to continue?"),
+                                QMessageBox::Yes | QMessageBox::No,
+                                QMessageBox::No);
+      switch (ret) {
+       case QMessageBox::Yes:
+         break;
+       case QMessageBox::No:
+      		ok = false;
+         break;
+       default:
+      		ok = false;
+         break;
+      }
+
   }
 
   if ((linePassword->text() != linePassword2->text()) || linePassword->text().isEmpty())

Modified: pcbsd/stable/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/stable/SysInstaller/sys-diskwidget.cpp	2010-06-01 22:19:35 UTC (rev 6856)
+++ pcbsd/stable/SysInstaller/sys-diskwidget.cpp	2010-06-02 20:50:18 UTC (rev 6857)
@@ -229,10 +229,21 @@
       return false;
     }
     if (!haveSwap) {
-      QMessageBox::critical(this, tr("PC-BSD Installer Error"),
-         tr("Missing SWAP file-system, please add a SWAP file-system to continue."),
-         QMessageBox::Ok);
-      return false;
+      int ret = QMessageBox::warning(this, tr("PC-BSD Install"),
+                                tr("No SWAP space has been setup, are you sure you want to continue?"),
+                                QMessageBox::Yes | QMessageBox::No,
+                                QMessageBox::No);
+      switch (ret) {
+       case QMessageBox::Yes:
+         break;
+       case QMessageBox::No:
+                return false;
+         break;
+       default:
+                return false;
+         break;
+      }
+
     }
 
     if (haveEncryption) {

Modified: pcbsd/stable/SysInstaller/sys-userwidget.cpp
===================================================================
--- pcbsd/stable/SysInstaller/sys-userwidget.cpp	2010-06-01 22:19:35 UTC (rev 6856)
+++ pcbsd/stable/SysInstaller/sys-userwidget.cpp	2010-06-02 20:50:18 UTC (rev 6857)
@@ -234,11 +234,24 @@
   bool ok;
   ok = true;
 
-  // Check if we hav e a username setup.
+  // Check if we have a username setup.
   if ( listUsers.empty() )
   {
-      textAcctNotify->setText(tr("You must setup at least one username to continue. "));
-      ok = false;
+      int ret = QMessageBox::warning(this, tr("PC-BSD Install"),
+                                tr("No usernames have been specified. Are you sure you want to continue?"),
+                                QMessageBox::Yes | QMessageBox::No,
+                                QMessageBox::No);
+      switch (ret) {
+       case QMessageBox::Yes:
+         break;
+       case QMessageBox::No:
+      		ok = false;
+         break;
+       default:
+      		ok = false;
+         break;
+      }
+
   }
 
   if ((linePassword->text() != linePassword2->text()) || linePassword->text().isEmpty())



More information about the Commits mailing list