1 | //␊ |
2 | // BootFlagsController.mm␊ |
3 | // ChameleonPrefPane␊ |
4 | //␊ |
5 | // Created by Rekursor on 1/22/10.␊ |
6 | //␊ |
7 | ␊ |
8 | #import "BootFlagsController.h"␊ |
9 | ␊ |
10 | // Constants␊ |
11 | ␊ |
12 | // File static variables␊ |
13 | static BootFlagsController *gInstance = NULL;␊ |
14 | ␊ |
15 | ␊ |
16 | @implementation BootFlagsController␊ |
17 | ␊ |
18 | //--------------------------------------------------------------------------␊ |
19 | - (id) init␊ |
20 | {␊ |
21 | ␉self = [super init];␊ |
22 | ␉return (gInstance = self);␊ |
23 | }␉␊ |
24 | ␊ |
25 | //--------------------------------------------------------------------------␊ |
26 | -(void) addOptionsDesc␊ |
27 | {␊ |
28 | ␉prop->addOptionDesc(mVerbose, nil, OptionUnix, "-v", "");␊ |
29 | ␉prop->addOptionDesc(mSafeBoot, nil, OptionUnix, "-x", "");␊ |
30 | ␉prop->addOptionDesc(mIgnoreBootConfig, nil, OptionUnix, "-F", "");␊ |
31 | ␉prop->addOptionDesc(mSingleUser, nil, OptionUnix, "-s", "");␊ |
32 | ␉prop->addOptionDesc(mTimeOut, mTimeOutText, OptionString,"Timeout", "5");␊ |
33 | ␉prop->addOptionDesc(mQuietBoot, nil, OptionYesNo, "Quiet Boot", "No");␊ |
34 | ␉prop->addOptionDesc(mInstantMenu, nil, OptionYesNo, "Instant Menu", "No");␊ |
35 | ␉prop->addOptionDesc(mWait, nil, OptionYesNo, "Wait", "No");␊ |
36 | ␉prop->addOptionDesc(mRescan, nil, OptionYesNo, "Rescan", "No");␊ |
37 | ␉prop->addOptionDesc(mRescanPrompt, nil, OptionYesNo, "Rescan Prompt", "No");␊ |
38 | ␉prop->addOptionDesc(mRescanSingleDrive, nil, OptionYesNo, "Rescan SingleDrive", "No");␊ |
39 | }␊ |
40 | ␊ |
41 | //--------------------------------------------------------------------------␊ |
42 | - (void) refreshLockStates␊ |
43 | {␊ |
44 | [self refreshLockState: mVerbose];␊ |
45 | [self refreshLockState: mSafeBoot];␊ |
46 | [self refreshLockState: mIgnoreBootConfig];␊ |
47 | [self refreshLockState: mTimeOut];␊ |
48 | [self refreshLockState: mTimeOutText];␊ |
49 | [self refreshLockState: mSingleUser];␊ |
50 | [self refreshLockState: mQuietBoot];␊ |
51 | [self refreshLockState: mInstantMenu];␊ |
52 | [self refreshLockState: mWait];␊ |
53 | [self refreshLockState: mRescan];␊ |
54 | [self refreshLockState: mRescanPrompt];␊ |
55 | [self refreshLockState: mRescanSingleDrive];␊ |
56 | }␊ |
57 | ␊ |
58 | //--------------------------------------------------------------------------␊ |
59 | -(void) loadOptionsFromPreferencesFile: (NSMutableDictionary*) dict␊ |
60 | {␊ |
61 | ␉␊ |
62 | }␊ |
63 | ␊ |
64 | //--------------------------------------------------------------------------␊ |
65 | -(IBAction) onCheckButtonChange: (NSButton*) sender␊ |
66 | {␊ |
67 | ␉[self handleSender: sender];␊ |
68 | }␊ |
69 | ␊ |
70 | //--------------------------------------------------------------------------␊ |
71 | -(IBAction) onTextFiedChange: (NSTextField*) sender␊ |
72 | {␊ |
73 | ␉[self handleSender: sender];␊ |
74 | }␊ |
75 | ␊ |
76 | + (BootFlagsController *)instance { return(gInstance);}␊ |
77 | ␊ |
78 | @end␊ |
79 | |