ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Controller.mm
(Generate patch)

Comparing BasiliskII/src/MacOSX/Controller.mm (file contents):
Revision 1.8 by nigel, 2003-03-26T00:20:54Z vs.
Revision 1.11 by cebix, 2004-01-12T15:29:24Z

# Line 3 | Line 3
3   *
4   *      $Id$
5   *
6 < *  Basilisk II (C) 1997-2001 Christian Bauer
6 > *  Basilisk II (C) 1997-2004 Christian Bauer
7   *
8   *  This program is free software; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by
# Line 67 | Line 67
67  
68   - (void) sendEvent: (NSEvent *)event;
69   {
70 <        if ( [self isAnyEmulatorDisplayingSheets] || ! [self isAnyEmulatorRunning] )
70 >        if ( [self isAnyEmulatorDisplayingSheets] ||
71 >                        [[thePrefsEditor window] isVisible] || ! [self isAnyEmulatorRunning] )
72                  [super sendEvent: event];
73          else
74          {
# Line 107 | Line 108
108   //
109   //              switch ( NSRunAlertPanel(title, msg, def, alt, other, nil) )
110   //              {
111 < //                      case NSAlertDefault:   savePrefs();
112 < //                      case NSAlertAlternate: return NSTerminateNow;
113 < //                      case NSAlertOther:     return NSTerminateCancel;
111 > //                      case NSAlertDefault:    savePrefs();
112 > //                      case NSAlertAlternate:  return NSTerminateNow;
113 > //                      case NSAlertOther:              return NSTerminateCancel;
114   //              }
115   //      }
116  
# Line 260 | Line 261
261  
262   - (IBAction) HelpHowTo: (id)sender
263   {
264 <    NSString    *path = [[NSBundle mainBundle] pathForResource: @"HowTo"
265 <                                                        ofType: @"html"];
264 >        NSString        *path = [[NSBundle mainBundle] pathForResource: @"HowTo"
265 >                                                                                                                ofType: @"html"];
266  
267 <    if ( ! path )
268 <        InfoSheet(@"Cannot find HowTo.html", [theEmulator window]);
269 <    else
270 <        if ( ! [[NSWorkspace sharedWorkspace] openFile: path
271 <                                       withApplication: @"TextEdit"] )
271 <            InfoSheet(@"Cannot open HowTo.html with TextEdit", [theEmulator window]);
267 >        if ( ! path )
268 >                InfoSheet(@"Cannot find HowTo.html", [theEmulator window]);
269 >        else
270 >                if ( ! [[NSWorkspace sharedWorkspace] openFile: path] )
271 >                        InfoSheet(@"Cannot open HowTo.html with default app", [theEmulator window]);
272   }
273  
274   - (IBAction) HelpToDo: (id)sender
275   {
276 <    NSString    *path = [[NSBundle mainBundle] pathForResource: @"ToDo"
277 <                                                        ofType: @"html"];
276 >        NSString        *path = [[NSBundle mainBundle] pathForResource: @"ToDo"
277 >                                                                                                                ofType: @"html"];
278  
279 <    if ( ! path )
280 <        InfoSheet(@"Cannot find ToDo.html", [theEmulator window]);
281 <    else
282 <        if ( ! [[NSWorkspace sharedWorkspace] openFile: path
283 <                                       withApplication: @"TextEdit"] )
284 <            InfoSheet(@"Cannot open ToDo.html with TextEdit", [theEmulator window]);
279 >        if ( ! path )
280 >                InfoSheet(@"Cannot find ToDo.html", [theEmulator window]);
281 >        else
282 >                if ( ! [[NSWorkspace sharedWorkspace] openFile: path
283 >                                                                           withApplication: @"TextEdit"] )
284 >                        InfoSheet(@"Cannot open ToDo.html with TextEdit", [theEmulator window]);
285   }
286  
287   - (IBAction) HelpVersions: (id)sender
288   {
289 <    NSString    *path = [[NSBundle mainBundle] pathForResource: @"Versions"
290 <                                                        ofType: @"html"];
289 >        NSString        *path = [[NSBundle mainBundle] pathForResource: @"Versions"
290 >                                                                                                                ofType: @"html"];
291  
292 <    if ( ! path )
293 <        InfoSheet(@"Cannot find Versions.html", [theEmulator window]);
294 <    else
295 <        if ( ! [[NSWorkspace sharedWorkspace] openFile: path
296 <                                       withApplication: @"TextEdit"] )
297 <            InfoSheet(@"Cannot open Versions.html with TextEdit",
292 >        if ( ! path )
293 >                InfoSheet(@"Cannot find Versions.html", [theEmulator window]);
294 >        else
295 >                if ( ! [[NSWorkspace sharedWorkspace] openFile: path
296 >                                                                           withApplication: @"TextEdit"] )
297 >                        InfoSheet(@"Cannot open Versions.html with TextEdit",
298                                                                                                  [theEmulator window]);
299   }
300  
# Line 397 | Line 397
397          return count;
398   }
399  
400 < @end
400 > @end

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines