~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/MacOSX/Controller.mm

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2005-07-30 20:42:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050730204220-1nl1cg2jkjvy63ry
Tags: 0.9.20050730-1
* New upstream CVS snapshot.
* Build-depend on virtual libsdl-dev (not libsdl1.2-dev).
* Invoke init rules also on clean (to separate better from official
  builds).
* Update URL of upstream source in debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *      Controller.m - Simple application window management. 
3
3
 *
4
 
 *      $Id: Controller.mm,v 1.9 2003/04/01 01:56:41 nigel Exp $
 
4
 *      $Id: Controller.mm,v 1.12 2005/01/30 21:42:13 gbeauche Exp $
5
5
 *
6
 
 *  Basilisk II (C) 1997-2001 Christian Bauer
 
6
 *  Basilisk II (C) 1997-2005 Christian Bauer
7
7
 *
8
8
 *  This program is free software; you can redistribute it and/or modify
9
9
 *  it under the terms of the GNU General Public License as published by
108
108
//
109
109
//              switch ( NSRunAlertPanel(title, msg, def, alt, other, nil) )
110
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
114
//              }
115
115
//      }
116
116
 
261
261
 
262
262
- (IBAction) HelpHowTo: (id)sender
263
263
{
264
 
    NSString    *path = [[NSBundle mainBundle] pathForResource: @"HowTo"
265
 
                                                        ofType: @"html"];
 
264
        NSString        *path = [[NSBundle mainBundle] pathForResource: @"HowTo"
 
265
                                                                                                                ofType: @"html"];
266
266
 
267
 
    if ( ! path )
268
 
        InfoSheet(@"Cannot find HowTo.html", [theEmulator window]);
269
 
    else
270
 
        if ( ! [[NSWorkspace sharedWorkspace] openFile: path
271
 
                                       withApplication: @"TextEdit"] )
272
 
            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]);
273
272
}
274
273
 
275
274
- (IBAction) HelpToDo: (id)sender
276
275
{
277
 
    NSString    *path = [[NSBundle mainBundle] pathForResource: @"ToDo"
278
 
                                                        ofType: @"html"];
 
276
        NSString        *path = [[NSBundle mainBundle] pathForResource: @"ToDo"
 
277
                                                                                                                ofType: @"html"];
279
278
 
280
 
    if ( ! path )
281
 
        InfoSheet(@"Cannot find ToDo.html", [theEmulator window]);
282
 
    else
283
 
        if ( ! [[NSWorkspace sharedWorkspace] openFile: path
284
 
                                       withApplication: @"TextEdit"] )
285
 
            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]);
286
285
}
287
286
 
288
287
- (IBAction) HelpVersions: (id)sender
289
288
{
290
 
    NSString    *path = [[NSBundle mainBundle] pathForResource: @"Versions"
291
 
                                                        ofType: @"html"];
 
289
        NSString        *path = [[NSBundle mainBundle] pathForResource: @"Versions"
 
290
                                                                                                                ofType: @"html"];
292
291
 
293
 
    if ( ! path )
294
 
        InfoSheet(@"Cannot find Versions.html", [theEmulator window]);
295
 
    else
296
 
        if ( ! [[NSWorkspace sharedWorkspace] openFile: path
297
 
                                       withApplication: @"TextEdit"] )
298
 
            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",
299
298
                                                                                                [theEmulator window]);
300
299
}
301
300
 
398
397
        return count;
399
398
}
400
399
 
401
 
@end
 
 
b'\\ No newline at end of file'
 
400
@end