ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/MacOSX/prefs_macosx.mm
(Generate patch)

Comparing SheepShaver/src/MacOSX/prefs_macosx.mm (file contents):
Revision 1.2 by asvitkine, 2009-08-18T18:22:01Z vs.
Revision 1.5 by asvitkine, 2010-07-27T02:55:09Z

# Line 24 | Line 24
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  
# Line 75 | Line 78
78  
79   - (void) openPreferences:(id)sender
80   {
81 +        NSAutoreleasePool *pool;
82 +
83          if (nibObjects == nil) {
84                  nibObjects = [self loadPrefsNibFile];
85                  if (nibObjects == nil)
# Line 82 | Line 87
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
# Line 94 | Line 101
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];
# Line 104 | Line 114 | void prefs_init(void)
114          [menuItem release];
115          
116          [NSApp setDelegate:[[SheepShaverMain alloc] init]];
117 +
118 +        [pool release];
119   }
120  
121  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines