Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 68) +++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 69) @@ -171,6 +171,10 @@ } } +- (IBAction)onAbout: (id)sender +{ + [mAboutDlg makeKeyAndOrderFront: sender]; +} //-------------------------------------------------------------------------- - (void) loadPreferences { Index: trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h =================================================================== --- trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h (revision 68) +++ trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h (revision 69) @@ -45,6 +45,7 @@ + (void) doForEachGroup: (GroupAction) action withOption:(id) option; // Set refresh state {enabled | disabled} depending on the authorizations state ++ (void) refreshBodLockState: (const BootOptionDesc*) bod; + (void) refreshLockState: (id) item; // Unitary Method for Load One option of any type Index: trunk/ChameleonPrefPane/Sources/BootSetupController.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/BootSetupController.mm (revision 68) +++ trunk/ChameleonPrefPane/Sources/BootSetupController.mm (revision 69) @@ -39,6 +39,7 @@ [PreferencesControllerBase refreshLockState: mFreezeParts ]; [PreferencesControllerBase refreshLockState: mInjectFrozenParts ]; [PreferencesControllerBase refreshLockState: mBootConfigPath ]; + [PreferencesControllerBase refreshLockState: mBootConfigPathText ]; } //-------------------------------------------------------------------------- @@ -57,10 +58,13 @@ [mSwapHD02 setIntValue: [[dict objectForKey: keySwapHD02] intValue]]; [mFreezeParts setIntValue: [[dict objectForKey: keyUseFrozenParts] intValue] ]; id obj = [dict objectForKey: keyForceBootConfigPath]; - if(obj) [mBootConfigPathText setStringValue: obj ]; - else [dict setObject:[[NSString alloc] initWithString: @""] forKey: keyForceBootConfigPath]; - int val = ([[mBootConfigPathText stringValue] length] >0 ? 1 : 0); + [mBootConfigPathText setStringValue: obj ? obj : @"" ]; + int val = (obj && [[mBootConfigPathText stringValue] length] >0 ? 1 : 0); [mBootConfigPath setIntValue: val]; + [dict setObject:[[NSString alloc] initWithString: [mBootConfigPathText stringValue]] + forKey: keyForceBootConfigPath]; + [mBootConfigPathText setEnabled: val ? true : false]; + [mBootConfigPathText setEditable: val ? true : false]; } @@ -241,7 +245,7 @@ { // IMPROVE ME: Should automatize the callback/load/save mechanism // for the preferences file like the bootConfig file - if (sender == mSwapHD01 || sender == mSwapHD01) + if (sender == mSwapHD01 || sender == mSwapHD02) { partExtractor->resetSwapping(); [self doSwapHD: [mSwapHD01 intValue] save:true src:0 dst:1]; Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h =================================================================== --- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h (revision 68) +++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h (revision 69) @@ -29,7 +29,8 @@ @private // Objects corresponding to the interface mapping: - IBOutlet CustomTableView * mPartitionsTable; + IBOutlet NSPanel* mAboutDlg; + IBOutlet CustomTableView * mPartitionsTable; IBOutlet NSTableColumn * mPartitionImgColumn; IBOutlet NSTableColumn * mFileSystemColumn; IBOutlet NSTableColumn * mPartitionNameColumn; @@ -64,6 +65,7 @@ - (IBAction)onRestart: (id)sender; - (IBAction)onShutdown: (id)sender; - (IBAction)onSleep: (id)sender; +- (IBAction)onAbout: (id)sender; - (void)awakeFromNib; - (void)initBootConfig; Index: trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm (revision 68) +++ trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm (revision 69) @@ -61,12 +61,42 @@ groupList.push_back(myGroup); } +- (void) synchronizeTextContent:(const BootOptionDesc*) bod withValue:(int) val +{ + if(!bod || !bod->contentID) return; + id item = (id) bod->contentID; + if ( [item isKindOfClass: [NSTextField class]] || + [item isKindOfClass: [NSComboBox class]]) + { + [item setEnabled: val]; + [item setEditable: val]; + } + +} //-------------------------------------------------------------------------- + (void) refreshLockState: (id) item { - [item setEnabled:[[ChameleonPrefPane instance] isUnlocked]]; - + const BootOptionDesc * bod = BootProp::instance().findOption(item); + if(!bod) bod=BootProp::instance().findOptionContent(item); + if(bod) [PreferencesControllerBase refreshBodLockState: bod]; + else [item setEnabled: [[ChameleonPrefPane instance] isUnlocked]]; } +//-------------------------------------------------------------------------- ++ (void) refreshBodLockState: (const BootOptionDesc*) bod +{ + if (!bod) return; + bool isUnlocked = [[ChameleonPrefPane instance] isUnlocked]; + if (bod->ID) [(id) bod->ID setEnabled: isUnlocked]; + int val = bod->ID ? [(id) bod->ID intValue] : 0; + if ( [(id) bod->contentID isKindOfClass: [NSTextField class]] || + [(id) bod->contentID isKindOfClass: [NSComboBox class]]) + { + [(id) bod->contentID setEnabled: (isUnlocked && val) ]; + [(id) bod->contentID setEditable: (isUnlocked && val) ]; + } + else + [(id) bod->contentID setEnabled: isUnlocked]; +} //-------------------------------------------------------------------------- + (void) refreshLockStates @@ -338,6 +368,7 @@ NSString* f = [self selectAnyFile ]; if (f) [(NSTextField*) bod->contentID setStringValue: f]; } + [self synchronizeTextContent: bod withValue: state]; break; default: break; Index: trunk/ChameleonPrefPane/Info.plist =================================================================== --- trunk/ChameleonPrefPane/Info.plist (revision 68) +++ trunk/ChameleonPrefPane/Info.plist (revision 69) @@ -17,7 +17,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.0 b8 + 2.0 RC1 CFBundleSignature ???? CFBundleVersion Index: trunk/ChameleonPrefPane/TODO =================================================================== --- trunk/ChameleonPrefPane/TODO (revision 68) +++ trunk/ChameleonPrefPane/TODO (revision 69) @@ -4,8 +4,10 @@ Current versions todo list -------------------------- + - Graphical deign (icons and otehr graphical matter..) management -> DieBuche + - Localization -> DieBuche, have a look to scrax translation file in German, Italian, portuguese + in the issue pane of the repository (thiagomorales propsed portuguese maybe spanish would be better first ?) - Enhance the partition filtering by checking really bootable partitions - (by contrast of the partion of a particular format) + (by contrast of the partition of a particular format) *OK* but can be improved - Try to investigate if there is a better way to get the partition list - (currently done with diskutil list) - - Localization, have a look to scrax translation file in italian in the issue pane of the repository \ No newline at end of file + (currently done with diskutil list) probably with Chameleon booter RC6. Index: trunk/ChameleonPrefPane/CHANGES =================================================================== --- trunk/ChameleonPrefPane/CHANGES (revision 68) +++ trunk/ChameleonPrefPane/CHANGES (revision 69) @@ -1,3 +1,6 @@ +- +- Fixed refresh and on checked associated button state, made sure the string is disabled if value is 0 +- Fixed crash when using swap hd 0<->2 - Added a new option type (OptionFileString) that features an open dialog box to open files - Added few Combo boxes to simplify text inputs - Added Missing ForceHPET option and Theme options Index: trunk/ChameleonPrefPane/bin/version =================================================================== --- trunk/ChameleonPrefPane/bin/version (revision 68) +++ trunk/ChameleonPrefPane/bin/version (revision 69) @@ -1 +1 @@ -2.0.b8 +2.0.RC1 Index: trunk/ChameleonPrefPane/Resources/getDevProp.sh =================================================================== --- trunk/ChameleonPrefPane/Resources/getDevProp.sh (revision 68) +++ trunk/ChameleonPrefPane/Resources/getDevProp.sh (revision 69) @@ -14,10 +14,10 @@ # Create a dump directory if [[ ! -d $dmpdir ]];then - mkdir $dmpdir + mkdir -p $dmpdir fi if [[ ! -d $tmpDir ]];then - mkdir $tmpDir + mkdir -p $tmpDir fi # Dump Device properties ioreg -lw0 -p IODeviceTree -n efi -r -x |grep device-properties | sed 's/.*.*//;' | cat > $dmpdir/chameleon-devprop.hex @@ -27,7 +27,12 @@ # Splash the result up !! open $dmpdir/chameleon-devprop.plist -rm -r $tmpdir +if [[ ! -d $dmpdir ]];then + rm -r $dmpdir +fi +if [[ ! -d $tmpDir ]];then + rm -r $tmpDir +fi #end #echo $? \ No newline at end of file Index: trunk/ChameleonPrefPane/English.lproj/Chameleon.xib =================================================================== --- trunk/ChameleonPrefPane/English.lproj/Chameleon.xib (revision 68) +++ trunk/ChameleonPrefPane/English.lproj/Chameleon.xib (revision 69) @@ -12,7 +12,8 @@ YES - + + YES @@ -1455,7 +1456,7 @@ 274 - {13, 210} + {13, 105} YES @@ -3448,13 +3449,13 @@ 8223 2 {{235, 265}, {464, 255}} - 611844096 + 1685585920 About the Chameleon Preferences Pane NSPanel {1.79769e+308, 1.79769e+308} - + 256 YES @@ -3471,9 +3472,9 @@ - + 1 - MSAxIDEAA + MC4xNjEyMjAzNTggMC4zMzc1NjA1ODA1IDEAA @@ -3490,17 +3491,17 @@ - + 268 - {{46, 20}, {373, 183}} + {{20, 20}, {424, 190}} YES - -1805517311 + -2076049920 272629760 ICBJbml0aWFsIENvbmNlcHRpb24gJiBEZXNpZ246ICAKCVJla3Vyc29yCiAgCiAgQ3JldyBNZW1iZXJz OiAgCglSZWt1cnNvciwgICBEaWVCdWNoZQogIAogIENvbnRyaWJ1dG9ycyAmIFRlc3RlcnM6ICAKCUJs @@ -3512,11 +3513,15 @@ 1 MCAwIDAAA - + + 1 + MC4yMjkzMDkxODM1IDAuMjk2MzI4MzY2NSAxAA + {464, 255} + {{0, 0}, {1920, 1058}} {1.79769e+308, 1.79769e+308} @@ -4858,6 +4863,22 @@ 878 + + + makeKeyAndOrderFront: + + + + 880 + + + + mAboutDlg + + + + 881 + @@ -6906,9 +6927,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{141, 79}, {668, 368}} + {{142, 79}, {668, 368}} com.apple.InterfaceBuilder.CocoaPlugin - {{141, 79}, {668, 368}} + {{142, 79}, {668, 368}} {224.664, 10} @@ -7404,9 +7425,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{724, 590}, {464, 255}} + {{524, 438}, {464, 255}} com.apple.InterfaceBuilder.CocoaPlugin - {{724, 590}, {464, 255}} + {{524, 438}, {464, 255}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -7665,7 +7686,7 @@ - 878 + 881 @@ -7879,6 +7900,7 @@ YES YES + onAbout: onRestart: onShutdown: onSleep: @@ -7888,6 +7910,7 @@ id id id + id @@ -7895,6 +7918,7 @@ YES authView + mAboutDlg mFileSystemColumn mOptions mPartitionIDColumn @@ -7909,6 +7933,7 @@ YES SFAuthorizationView + NSPanel NSTableColumn NSBox NSTableColumn