2 //-----------------------------------------------------------------------------
4 // Copyright(C) 2009 Simon Howard
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 //-----------------------------------------------------------------------------
23 #include "AppController.h"
25 @implementation AppController
29 NSMutableDictionary *defaults = [NSMutableDictionary dictionary];
32 * Register your app's defaults here by adding objects to the
35 * [defaults setObject:anObject forKey:keyForThatObject];
39 [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
40 [[NSUserDefaults standardUserDefaults] synchronize];
45 if ((self = [super init]))
59 [[NSApp mainMenu] setTitle:@"ChocolateDoom"];
62 - (void)applicationDidFinishLaunching:(NSNotification *)aNotif
64 // Uncomment if your application is Renaissance-based
65 // [NSBundle loadGSMarkupNamed:@"Main" owner:self];
68 - (BOOL)applicationShouldTerminate:(id)sender
73 - (void)applicationWillTerminate:(NSNotification *)aNotif
77 - (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName
79 printf("File selected to open: '%s'\n", [fileName UTF8String]);
83 - (void)showPrefPanel:(id)sender