24 |
|
|
25 |
|
#include "sysdeps.h" |
26 |
|
|
27 |
+ |
// The _UINT64 define is needed to guard against a typedef mismatch with Snow Leopard headers. |
28 |
+ |
#define _UINT64 |
29 |
+ |
|
30 |
|
#include <Cocoa/Cocoa.h> |
31 |
|
#include "VMSettingsController.h" |
32 |
|
|
78 |
|
|
79 |
|
- (void) openPreferences:(id)sender |
80 |
|
{ |
81 |
+ |
NSAutoreleasePool *pool; |
82 |
+ |
|
83 |
|
if (nibObjects == nil) { |
84 |
|
nibObjects = [self loadPrefsNibFile]; |
85 |
|
if (nibObjects == nil) |
87 |
|
[nibObjects retain]; |
88 |
|
} |
89 |
|
|
90 |
+ |
pool = [[NSAutoreleasePool alloc] init]; |
91 |
|
[[VMSettingsController sharedInstance] setupGUI]; |
92 |
|
[NSApp runModalForWindow:prefsWindow]; |
93 |
+ |
[pool release]; |
94 |
|
} |
95 |
|
|
96 |
|
@end |
101 |
|
|
102 |
|
void prefs_init(void) |
103 |
|
{ |
104 |
+ |
NSAutoreleasePool *pool; |
105 |
|
NSMenu *appMenu; |
106 |
|
NSMenuItem *menuItem; |
107 |
|
|
108 |
+ |
pool = [[NSAutoreleasePool alloc] init]; |
109 |
+ |
|
110 |
|
appMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu]; |
111 |
|
menuItem = [[NSMenuItem alloc] initWithTitle:@"Preferences..." action:@selector(openPreferences:) keyEquivalent:@","]; |
112 |
|
[appMenu insertItem:menuItem atIndex:2]; |
114 |
|
[menuItem release]; |
115 |
|
|
116 |
|
[NSApp setDelegate:[[SheepShaverMain alloc] init]]; |
117 |
+ |
|
118 |
+ |
[pool release]; |
119 |
|
} |
120 |
|
|
121 |
|
|