Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 458) +++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 459) @@ -299,6 +299,9 @@ [[TableViewsController instance ]->mPartitionsTable selectRowIndexes: [NSIndexSet indexSetWithIndex:index] byExtendingSelection:NO]; } } + else + [[TableViewsController instance ]->mPartitionsTable selectRowIndexes: nil byExtendingSelection:NO]; + } } Index: trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm (revision 458) +++ trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm (revision 459) @@ -317,10 +317,8 @@ [ [(NSTextField*) bod->contentID stringValue] UTF8String ]; if (contentValue.length()>0) status = BootProp::instance().setStringForKey(bod->Name, contentValue.c_str()); - else { - return false; // no content to save so don't save it - } - + else + status = BootProp::instance().removeKeyAndValue(bod->Name); } break; default: @@ -354,8 +352,13 @@ if (!bod) { bod = BootProp::instance().findOptionContent(sender); NSTextField* textField = (NSTextField*) sender; - std::string content = [[textField stringValue] UTF8String ]; - if(bod->ID!=nil) sender = (id) bod->ID; + + if(bod->ID!=nil) + { + sender = (id) bod->ID; + [(NSTextField*)bod->contentID setStringValue: [textField stringValue] ]; + + } } else { Index: trunk/ChameleonPrefPane/Sources/BootSetupController.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/BootSetupController.mm (revision 458) +++ trunk/ChameleonPrefPane/Sources/BootSetupController.mm (revision 459) @@ -173,8 +173,6 @@ [[[TableViewsController instance] partitionsTable] reloadData]; [[[TableViewsController instance] partitionsTable] scrollRowToVisible: 0]; - //[self tableViewSelectionDidChange: nil]; - } @@ -269,7 +267,21 @@ BootProp::instance().cleanup(); [[ChameleonPrefPane instance ] initBootConfig]; } + //-------------------------------------------------------------------------- +-(void) updateHideRen: (bool) loadOptions +{ + NSString* partsToHide = [mHidePartition intValue] ? [mHidePartitionText stringValue] : @""; + NSString* partsToRename = [mRenamePartition intValue] ? [mRenamePartitionText stringValue] : @""; + + if (loadOptions) + [PreferencesControllerBase loadOptionsFromBootFile ]; + NSLog(@"parts to hide=%@ to ren=%@", partsToHide, partsToRename); + [PartsInfoMgr reloadWithHideSpec: partsToHide andRenameSpec: partsToRename ]; + +} + +//-------------------------------------------------------------------------- -(IBAction) onCheckButtonChange: (NSButton*) sender { // IMPROVE ME: Should automatize the callback/load/save mechanism @@ -291,11 +303,17 @@ { [self onInjectPartsToFreeze: mInjectFrozenParts]; } - else if (sender == mDefaultPartition || sender == mHidePartition - || sender == mRenamePartition ) + else if (sender == mDefaultPartition ) { // sync with other panels [self handleSender:sender]; + [ [self chameleon] selectDefaultPartition]; + } + else if (sender == mHidePartition || sender == mRenamePartition ) + { // sync with other panels + [self updateHideRen: false ]; + [self handleSender:sender]; + } else if (sender == mBootConfigPath || (NSTextField*)sender == mBootConfigPathText) { // sync with other panels [self onForceBootConfigPath: sender]; @@ -318,13 +336,15 @@ if ( sender == mDefaultPartitionText || sender == mHidePartitionText || sender == mRenamePartitionText ) { + [self handleSender:sender]; - - [PreferencesControllerBase loadOptionsFromBootFile ]; - [PartsInfoMgr reloadWithHideSpec: [mHidePartitionText stringValue] andRenameSpec: [mRenamePartitionText stringValue] ]; - + [self updateHideRen: true ]; + [self doSwapHD: [mSwapHD01 intValue] save:true src:0 dst:1]; [self doSwapHD: [mSwapHD02 intValue] save:true src:0 dst:2]; + + if (sender == mDefaultPartitionText) + [ [self chameleon] selectDefaultPartition]; } else if (sender == mBootConfigPathText) { Index: trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm (revision 458) +++ trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm (revision 459) @@ -156,7 +156,7 @@ self.vName = [self stringValueWithKey: @"DAVolumeName"]; self.vPath = [self stringValueWithKey: @"DAVolumePath"]; if (self.vName == nil || [vName length]==0) - self.vName = [self.vPath lastPathComponent ]; + self.vName = [[self.vPath lastPathComponent ] stringByReplacingOccurrencesOfString:@"%20" withString:@" "]; self.vAliasName = self.vName; // by default renamed = original part name self.vKind = [self stringValueWithKey: @"DAVolumeKind"]; self.mediaPath = [self stringValueWithKey: @"DAMediaPath"]; Index: trunk/ChameleonPrefPane/bin/OSX106/Chameleon.zip =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/ChameleonPrefPane/bin/version =================================================================== --- trunk/ChameleonPrefPane/bin/version (revision 458) +++ trunk/ChameleonPrefPane/bin/version (revision 459) @@ -1 +1 @@ -Revision: 457 +Revision: 458