shithub: choc

Download patch

ref: 6e0df0d01676cec59caaafa2cea3910c5a9b51e0
parent: 893c8dbe922b5ee6ac14c3df3b5020817b6797b3
author: Simon Howard <[email protected]>
date: Fri Jan 15 14:29:28 EST 2010

Don't open the configuration window when the launcher is first run;
display an error message if the user tries to launch the game without an
IWAD selected.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1817

--- a/pkg/osx/IWADController.m
+++ b/pkg/osx/IWADController.m
@@ -256,16 +256,11 @@
 
     [self setIWADConfig];
 
-    // Populate the dropdown IWAD list, and open the configuration
-    // dialog if not yet configured.
+    // Populate the dropdown IWAD list.
 
     if ([self setDropdownList])
     {
         [self setDropdownSelection];
-    }
-    else
-    {
-        [self openConfigWindow: nil];
     }
 }
 
--- a/pkg/osx/LauncherManager.m
+++ b/pkg/osx/LauncherManager.m
@@ -284,12 +284,19 @@
     iwad = [self->iwadController getIWADLocation];
     args = [self->commandLineArguments stringValue];
 
-    if (iwad != nil)
+    if (iwad == nil)
     {
-        ExecuteProgram(PACKAGE_TARNAME, [iwad UTF8String],
-                                        [args UTF8String]);
-        [NSApp terminate:sender];
+        NSRunAlertPanel(@"No IWAD selected",
+                        @"You have not selected an IWAD (game) file.\n\n"
+                         "You must configure and select a valid IWAD file "
+                         "in order to launch the game.",
+                        @"OK", nil, nil);
+        return;
     }
+
+    ExecuteProgram(PACKAGE_TARNAME, [iwad UTF8String],
+                                    [args UTF8String]);
+    [NSApp terminate:sender];
 }
 
 - (void) runSetup: (id)sender