//
//  AdvancedSetupController.mm
//  ChameleonPrefPane
//
//  Created by Rekursor on 1/22/10.
//

#import "AdvancedSetupController.h"

static AdvancedSetupController *gInstance = NULL;

@implementation AdvancedSetupController

//--------------------------------------------------------------------------
- (id) init
{
	self = [super init];
	return (gInstance = self);
}	

//--------------------------------------------------------------------------
- (void) addOptionsDesc
{
    BootProp::instance().addOptionDesc(mKernel, mKernelText, OptionKernel1, "Kernel", "mach_kernel"); // empty field for 1 field only "i.e: mach_kernel" syntax 
    BootProp::instance().addOptionDesc(mDeviceRd, mDeviceRdText, OptionKernel, "rd", "");
    BootProp::instance().addOptionDesc(mArch, mArchText, OptionKernel, "arch", "");
    BootProp::instance().addOptionDesc(mCPU, mCPUText, OptionKernel, "cpus", "");
    BootProp::instance().addOptionDesc(mBusRatio, mBusRatioText, OptionKernel,  "busratio", "");
    BootProp::instance().addOptionDesc(mDebug, mDebugText, OptionString, "debug", "");
    BootProp::instance().addOptionDesc(mIO, mIOText, OptionString, "io", "");
    BootProp::instance().addOptionDesc(mDisableKextsBlacklisting, nil, OptionUnix, "blacklist=0", "");
    BootProp::instance().addOptionDesc(mDSDTFile, mDSDTFileText, OptionFileString, "DSDT", "");
    BootProp::instance().addOptionDesc(mDSDTDrop, nil, OptionYesNo, "DropSSDT", "No");
    BootProp::instance().addOptionDesc(mSMBIOSFile,mSMBIOSFileText, OptionFileString, "SMBIOS", "");
    BootProp::instance().addOptionDesc(mSMBIOSDefaults, nil, OptionYesNo, "SMBIOSdefaults", "Yes");
    BootProp::instance().addOptionDesc(mWake, nil, OptionYesNo, "Wake", "No");
    BootProp::instance().addOptionDesc(mForceWake, nil, OptionYesNo, "ForceWake", "No");
    BootProp::instance().addOptionDesc(mWakeImage, mWakeImageText, OptionFileString, "WakeImage", "");
    BootProp::instance().addOptionDesc(mSystemId, mSystemIdText, OptionString, "SystemId", "");
    BootProp::instance().addOptionDesc(mSystemType, mSystemTypeText, OptionString, "SystemType", "");
    BootProp::instance().addOptionDesc(mRestartFix, nil, OptionYesNo, "RestartFix", "Yes");
}

//--------------------------------------------------------------------------
-(void) setDefaultsValues: (NSMutableDictionary*) dict
{
}

//--------------------------------------------------------------------------
- (void) refreshLockStates
{
	// automatic, nothing to do
}

//--------------------------------------------------------------------------
-(void) loadOptionsFromPreferencesFile: (NSMutableDictionary*) dict
{
	
}

//--------------------------------------------------------------------------
-(IBAction) onCheckButtonChange: (NSButton*) sender
{
	[self handleSender: sender];
}

//--------------------------------------------------------------------------
-(IBAction) onTextFiedChange: (NSTextField*) sender
{
	[self handleSender: sender];
}

+ (AdvancedSetupController *)instance { return(gInstance);}

@end
