Chameleon Applications

Chameleon Applications Commit Details

Date:2011-12-11 01:29:37 (5 years 5 months ago)
Author:Rekursor
Commit:459
Parents: 458
Message:Fixed hide, rename or default partition potential refresh problems
Changes:
M/trunk/ChameleonPrefPane/Sources/BootSetupController.mm
M/trunk/ChameleonPrefPane/bin/OSX106/Chameleon.zip
M/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
M/trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm
M/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm
M/trunk/ChameleonPrefPane/bin/version

File differences

trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
299299
300300
301301
302
303
304
302305
303306
304307
[[TableViewsController instance ]->mPartitionsTable selectRowIndexes: [NSIndexSet indexSetWithIndex:index] byExtendingSelection:NO];
}
}
else
[[TableViewsController instance ]->mPartitionsTable selectRowIndexes: nil byExtendingSelection:NO];
}
}
trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm
317317
318318
319319
320
321
322
323
320
321
324322
325323
326324
......
354352
355353
356354
357
358
355
356
357
358
359
360
361
359362
360363
361364
[ [(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:
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
{
trunk/ChameleonPrefPane/Sources/BootSetupController.mm
173173
174174
175175
176
177
178176
179177
180178
......
269267
270268
271269
270
272271
272
273
274
275
276
277
278
279
280
281
282
283
284
273285
274286
275287
......
291303
292304
293305
294
295
306
296307
297308
309
310
298311
312
313
314
315
316
299317
300318
301319
......
318336
319337
320338
339
321340
322
323
324
325
341
342
326343
327344
345
346
347
328348
329349
330350
[[[TableViewsController instance] partitionsTable] reloadData];
[[[TableViewsController instance] partitionsTable] scrollRowToVisible: 0];
//[self tableViewSelectionDidChange: nil];
}
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
{
[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];
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)
{
trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm
156156
157157
158158
159
159
160160
161161
162162
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"];
trunk/ChameleonPrefPane/bin/version
1
1
Revision: 457
Revision: 458

Archive Download the corresponding diff file

Revision: 459