25 |
|
|
26 |
|
const int CDROMRefNum = -62; // RefNum of driver |
27 |
|
|
28 |
+ |
#ifdef STANDALONE_PREFS |
29 |
|
void prefs_init() |
30 |
|
{ |
31 |
|
} |
33 |
|
void prefs_exit() |
34 |
|
{ |
35 |
|
} |
36 |
+ |
#endif |
37 |
|
|
38 |
|
@implementation VMSettingsController |
39 |
|
|
171 |
|
[NSApp runModalForWindow:window]; |
172 |
|
} |
173 |
|
|
174 |
+ |
- (void) editSettingsForNewVM: (NSString *) vmdir sender: (id) sender |
175 |
+ |
{ |
176 |
+ |
chdir([vmdir fileSystemRepresentation]); |
177 |
+ |
AddPrefsDefaults(); |
178 |
+ |
AddPlatformPrefsDefaults(); |
179 |
+ |
LoadPrefs([vmdir fileSystemRepresentation]); |
180 |
+ |
NSWindow *window = [self window]; |
181 |
+ |
[NSApp runModalForWindow:window]; |
182 |
+ |
} |
183 |
+ |
|
184 |
|
static NSString *makeRelativeIfNecessary(NSString *path) |
185 |
|
{ |
186 |
|
char cwd[1024], filename[1024]; |
328 |
|
|
329 |
|
- (void) cancelEdit: (id) sender |
330 |
|
{ |
331 |
+ |
#ifdef STANDALONE_PREFS |
332 |
|
PrefsExit(); |
333 |
+ |
#endif |
334 |
|
[[self window] close]; |
335 |
|
[NSApp stopModal]; |
336 |
|
cancelWasClicked = YES; |
387 |
|
PrefsReplaceString("serialb", [[printerPort stringValue] UTF8String]); |
388 |
|
PrefsReplaceString("ether", [[ethernetInterface stringValue] UTF8String]); |
389 |
|
SavePrefs(); |
390 |
+ |
#ifdef STANDALONE_PREFS |
391 |
|
PrefsExit(); |
392 |
+ |
#endif |
393 |
|
|
394 |
|
[[self window] close]; |
395 |
|
[NSApp stopModal]; |