QTfrontend/main.cpp
branchphysfslayer
changeset 7928 88fde28bbda6
parent 7772 a33077239712
parent 7794 ab7b94c03bc9
child 7931 5a27ed7f17b7
--- a/QTfrontend/main.cpp	Sun Oct 21 01:28:33 2012 +0400
+++ b/QTfrontend/main.cpp	Sat Nov 03 00:34:35 2012 +0400
@@ -92,10 +92,12 @@
     if (!tmpdir.exists(dir))
         if (!tmpdir.mkdir(dir))
         {
-            QMessageBox::critical(0,
-                                  QObject::tr("Error"),
-                                  QObject::tr("Cannot create directory %1").arg(dir),
-                                  QObject::tr("OK"));
+            QMessageBox directoryMsg(QApplication::activeWindow());
+            directoryMsg.setIcon(QMessageBox::Warning);
+            directoryMsg.setWindowTitle(QMessageBox::tr("Main - Error"));
+            directoryMsg.setText(QMessageBox::tr("Cannot create directory %1").arg(dir));
+            directoryMsg.setWindowModality(Qt::WindowModal);
+            directoryMsg.exec();
             return false;
         }
     return true;
@@ -208,10 +210,14 @@
     datadir->cd(*cDataDir);
     if(!datadir->cd("hedgewars/Data"))
     {
-        QMessageBox::critical(0, QMessageBox::tr("Error"),
-                              QMessageBox::tr("Failed to open data directory:\n%1\n"
-                                              "Please check your installation").
-                              arg(datadir->absolutePath()+"/hedgewars/Data"));
+        QMessageBox missingMsg(QApplication::activeWindow());
+        missingMsg.setIcon(QMessageBox::Critical);
+        missingMsg.setWindowTitle(QMessageBox::tr("Main - Error"));
+        missingMsg.setText(QMessageBox::tr("Failed to open data directory:\n%1\n\n"
+                                           "Please check your installation!").
+                                            arg(datadir->absolutePath()+"/hedgewars/Data"));
+        missingMsg.setWindowModality(Qt::WindowModal);
+        missingMsg.exec();
         return 1;
     }