1 #import "SettingsWindow.h"
3 // @@@ need to add code to remember the radio button settings as a pref
5 @implementation SettingsWindow
7 - (void)applicationDidFinishLaunching:(NSNotification *)val
9 [myWindow makeKeyAndOrderFront:self];
10 [NSApp activateIgnoringOtherApps:YES];
13 // @@@ don't need this right now as the nib is connected to terminate
14 - (void)cancel:(id)sender
22 char commandLine[256];
24 strcpy(commandLine, "/System/Library/StartupItems/SecurityServer/enable ");
25 strcat(commandLine, (securityOnOffSetting ? "no" : "yes"));
27 status=system(commandLine);
30 NSRunAlertPanel(@"Alert", @"Error executing the enable component.\nSecurity settings not changed.", @"OK", nil, nil, nil);
34 [[NSApplication sharedApplication] terminate:self];
38 - (void)securityOnOff:(id)sender
40 switch ([sender selectedRow])
42 case 0: securityOnOffSetting = 0;
44 case 1: securityOnOffSetting = 1;