fix issue 24 and issue 81
authorkoda
Fri, 08 Oct 2010 17:47:00 +0200
changeset 3937 494221b5950e
parent 3936 0b982d340633
child 3938 033114a6a960
fix issue #24 and issue 81
QTfrontend/about.cpp
QTfrontend/achievements.cpp
QTfrontend/gameuiconfig.cpp
QTfrontend/hwform.cpp
QTfrontend/hwform.h
QTfrontend/pages.h
--- a/QTfrontend/about.cpp	Thu Oct 07 16:02:28 2010 -0400
+++ b/QTfrontend/about.cpp	Fri Oct 08 17:47:00 2010 +0200
@@ -90,7 +90,7 @@
             "<br>"
             "Julien Koesten &lt;<a href=\"mailto:julienkoesten@aol.com\">julienkoesten@aol.com</a>&gt;"
             "<br>"
-            "Joshua O'Sullivan &lt;<a href=\"mailto:battysausage@hotmail.co.uk\">battysausage@hotmail.co.uk</a>&gt;"
+            "Joshua O'Sullivan &lt;<a href=\"mailto:coheedftw@hotmail.co.uk\">coheedftw@hotmail.co.uk</a>&gt;"
             "<br>"
             "Nils Lück &lt;<a href=\"mailto:nils.luck.design@gmail.com\">nils.luck.design@gmail.com</a>&gt;"
             "<br>"
--- a/QTfrontend/achievements.cpp	Thu Oct 07 16:02:28 2010 -0400
+++ b/QTfrontend/achievements.cpp	Fri Oct 08 17:47:00 2010 +0200
@@ -33,5 +33,5 @@
     {"skipping", QT_TRANSLATE_NOOP("achievements", "Skipped"),              QT_TRANSLATE_NOOP("achievements", "Let a single hog skip over the surface of the water for at least 5 times."),                   "skipped",    "1", "hidden"},
     {"cgunman",  QT_TRANSLATE_NOOP("achievements", "Crazy Gunman"),         QT_TRANSLATE_NOOP("achievements", "Eliminate 3 hogs with a single shot of the sniper rifle."),                                    "cgunman",    "1", ""},
     */
-    {0, 0, 0, 0, 0, 0} // "terminator" line
+    { {0, 0, 0, 0, 0, 0} } // "terminator" line
 };
--- a/QTfrontend/gameuiconfig.cpp	Thu Oct 07 16:02:28 2010 -0400
+++ b/QTfrontend/gameuiconfig.cpp	Fri Oct 08 17:47:00 2010 +0200
@@ -178,7 +178,7 @@
 quint32 GameUIConfig::translateQuality()
 {
     quint32 rqNone = 0x00000000;  // don't reduce quality
-    quint32 rqLowRes = 0x00000001;  // use half land array
+    //quint32 rqLowRes = 0x00000001;  // use half land array
     quint32 rqBlurryLand = 0x00000002;  // downscaled terrain
     quint32 rqNoBackground = 0x00000004;  // don't draw background
     quint32 rqSimpleRope = 0x00000008;  // avoid drawing rope
--- a/QTfrontend/hwform.cpp	Thu Oct 07 16:02:28 2010 -0400
+++ b/QTfrontend/hwform.cpp	Fri Oct 08 17:47:00 2010 +0200
@@ -83,7 +83,7 @@
 
     ui.setupUi(this);
     setMinimumSize(760, 580);
-
+    setFocusPolicy(Qt::StrongFocus);
     CustomizePalettes();
 
     ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
@@ -93,13 +93,13 @@
     namegen = new HWNamegen();
 
 #ifdef __APPLE__
-        panel = new M3Panel;
+    panel = new M3Panel;
 #ifdef SPARKLE_ENABLED
-        AutoUpdater* updater;
-        CocoaInitializer initializer;
-        updater = new SparkleAutoUpdater(SPARKLE_APPCAST_URL);
-    if(updater && config->isAutoUpdateEnabled())
-            updater->checkForUpdates();
+    AutoUpdater* updater;
+    CocoaInitializer initializer;
+    updater = new SparkleAutoUpdater(SPARKLE_APPCAST_URL);
+    if (updater && config->isAutoUpdateEnabled())
+        updater->checkForUpdates();
 #endif
 #endif
 
@@ -274,6 +274,12 @@
   }
 }
 
+void HWForm::keyReleaseEvent(QKeyEvent *event)
+{
+  if (event->key() == Qt::Key_Escape || event->key() == Qt::Key_Backspace)
+    this->GoBack();
+}
+
 void HWForm::CustomizePalettes()
 {
     QList<QScrollBar *> allSBars = findChildren<QScrollBar *>();
@@ -529,11 +535,11 @@
 {
     if (eggTimer.elapsed() < 3000){
 #ifdef __APPLE__
-                panel->showInstallController();
+        panel->showInstallController();
 #endif
         close();
     }
-        else
+    else
     {
         QPushButton * btn = findChild<QPushButton *>("imageButt");
         if (btn)
@@ -1127,3 +1133,4 @@
     registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\"");
     QMessageBox::information(0, "", QMessageBox::tr("All file associations have been set."));
 }
+
--- a/QTfrontend/hwform.h	Thu Oct 07 16:02:28 2010 -0400
+++ b/QTfrontend/hwform.h	Fri Oct 08 17:47:00 2010 +0200
@@ -127,7 +127,8 @@
     void closeEvent(QCloseEvent *event);
     void CustomizePalettes();
     void resizeEvent(QResizeEvent * event);
-
+    void keyReleaseEvent(QKeyEvent *event);
+    
     enum PageIDs {
         ID_PAGE_SETUP_TEAM      =  0,
         ID_PAGE_SETUP           =  1,
--- a/QTfrontend/pages.h	Thu Oct 07 16:02:28 2010 -0400
+++ b/QTfrontend/pages.h	Fri Oct 08 17:47:00 2010 +0200
@@ -70,6 +70,7 @@
  protected:
   AbstractPage(QWidget* parent = 0) {
     font14 = new QFont("MS Shell Dlg", 14);
+    setFocusPolicy(Qt::StrongFocus);
   }
   virtual ~AbstractPage() {};