75 |
|
|
76 |
|
- (void) openPreferences:(id)sender |
77 |
|
{ |
78 |
+ |
NSAutoreleasePool *pool; |
79 |
+ |
|
80 |
|
if (nibObjects == nil) { |
81 |
|
nibObjects = [self loadPrefsNibFile]; |
82 |
|
if (nibObjects == nil) |
84 |
|
[nibObjects retain]; |
85 |
|
} |
86 |
|
|
87 |
+ |
pool = [[NSAutoreleasePool alloc] init]; |
88 |
|
[[VMSettingsController sharedInstance] setupGUI]; |
89 |
|
[NSApp runModalForWindow:prefsWindow]; |
90 |
+ |
[pool release]; |
91 |
|
} |
92 |
|
|
93 |
|
@end |
98 |
|
|
99 |
|
void prefs_init(void) |
100 |
|
{ |
101 |
+ |
NSAutoreleasePool *pool; |
102 |
|
NSMenu *appMenu; |
103 |
|
NSMenuItem *menuItem; |
104 |
|
|
105 |
+ |
pool = [[NSAutoreleasePool alloc] init]; |
106 |
+ |
|
107 |
|
appMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu]; |
108 |
|
menuItem = [[NSMenuItem alloc] initWithTitle:@"Preferences..." action:@selector(openPreferences:) keyEquivalent:@","]; |
109 |
|
[appMenu insertItem:menuItem atIndex:2]; |
111 |
|
[menuItem release]; |
112 |
|
|
113 |
|
[NSApp setDelegate:[[SheepShaverMain alloc] init]]; |
114 |
+ |
|
115 |
+ |
[pool release]; |
116 |
|
} |
117 |
|
|
118 |
|
|