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.6 by asvitkine, 2010-08-22T19:33:25Z

# 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  
33 +
34   @interface SheepShaverMain : NSObject
35 + {
36          NSArray *nibObjects;
37          NSWindow *prefsWindow;
38 + }
39   @end
40  
41   @implementation SheepShaverMain
# Line 75 | Line 81
81  
82   - (void) openPreferences:(id)sender
83   {
84 +        NSAutoreleasePool *pool;
85 +
86          if (nibObjects == nil) {
87                  nibObjects = [self loadPrefsNibFile];
88                  if (nibObjects == nil)
# Line 82 | Line 90
90                  [nibObjects retain];
91          }
92  
93 +        pool = [[NSAutoreleasePool alloc] init];
94          [[VMSettingsController sharedInstance] setupGUI];
95          [NSApp runModalForWindow:prefsWindow];
96 +        [pool release];
97   }
98  
99   @end
# Line 94 | Line 104
104  
105   void prefs_init(void)
106   {
107 +        NSAutoreleasePool *pool;
108          NSMenu *appMenu;
109          NSMenuItem *menuItem;
110  
111 +        pool = [[NSAutoreleasePool alloc] init];
112 +
113          appMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu];
114          menuItem = [[NSMenuItem alloc] initWithTitle:@"Preferences..." action:@selector(openPreferences:) keyEquivalent:@","];
115          [appMenu insertItem:menuItem atIndex:2];
# Line 104 | Line 117 | void prefs_init(void)
117          [menuItem release];
118          
119          [NSApp setDelegate:[[SheepShaverMain alloc] init]];
120 +
121 +        [pool release];
122   }
123  
124  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines