1 /* Example for use of GNU gettext.
2 This file is in the public domain.
4 Source code of the AppController class. */
6 #include "AppController.h"
9 @implementation AppController
11 static NSDictionary *infoDict = nil;
15 NSMutableDictionary *defaults = [NSMutableDictionary dictionary];
17 [[NSUserDefaults standardUserDefaults] registerDefaults: defaults];
18 [[NSUserDefaults standardUserDefaults] synchronize];
39 - (void)applicationDidFinishLaunching:(NSNotification *)notif
43 - (BOOL)applicationShouldTerminate:(id)sender
48 - (void)applicationWillTerminate:(NSNotification *)notification
52 - (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName
56 - (void)showPrefPanel:(id)sender
60 - (void)showInfoPanel:(id)sender
65 NSBundle *bundle = [NSBundle mainBundle];
67 fp = [bundle pathForResource: @"Info-project" ofType: @"plist"];
68 infoDict = [[NSDictionary dictionaryWithContentsOfFile: fp] retain];
70 [[NSApplication sharedApplication] orderFrontStandardInfoPanelWithOptions: infoDict];
73 - (void)showHelloWindow:(id)sender
76 hello = [[Hello alloc] init];
78 [hello makeKeyAndOrderFront];