Chameleon Applications

Chameleon Applications Commit Details

Date:2011-11-14 08:54:31 (12 years 5 months ago)
Author:Rekursor
Commit:342
Parents: 341
Message:Fixed ren/hide restore bug
Changes:
M/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
M/trunk/ChameleonPrefPane/Sources/PartitionInfoManager.mm

File differences

trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
255255
256256
257257
258
258
259
259260
260261
261262
if (s==nil) s = "";
[PartsInfoMgr renameParts: [NSString stringWithUTF8String: s]];
// PartitionExtractor::instance().resetSwapping();
[PartsInfoMgr resetSwapping];
id val = [mOptionsDict valueForKey: keySwapHD01];
[[BootSetupController instance]->mSwapHD01 setIntValue: [val intValue] ];
[[BootSetupController instance] doSwapHD: [val boolValue] save: false src:0 dst:1];
trunk/ChameleonPrefPane/Sources/PartitionInfoManager.mm
117117
118118
119119
120
121
120122
121
123
122124
125
126
127
128
129
123130
124
125
126
131
132
133
127134
128135
129136
......
156163
157164
158165
159
166
160167
168
169
170
171
172
161173
162
174
163175
164176
165177
......
176188
177189
178190
179
180191
181192
182193
}
}
static NSString *sHideSpec=nil, *sRenSpec=nil;
/// Update paritions alias with partSpec
+(void) hideParts: (NSString*) partSpec
+(void) hideParts: (NSString*) hideSpec
{
if (hideSpec!=nil) {
if (sHideSpec!=nil) [sHideSpec release];
sHideSpec = [hideSpec copy];
}
// first prioritize strings in double quotes
if ([partSpec rangeOfString:@"\""].location != NSNotFound)
hideIterateOn(partSpec, @"\"");
hideIterateOn(partSpec, @"\" \t\n");
if ([sHideSpec rangeOfString:@"\""].location != NSNotFound)
hideIterateOn(sHideSpec, @"\"");
hideIterateOn(sHideSpec, @"\" \t\n");
}
}
/// Update parttiions hidden property with partSpec
+(void) renameParts: (NSString*) partSpec
+(void) renameParts: (NSString*) renSpec
{
if (renSpec!=nil) {
if (sRenSpec!=nil) [sRenSpec release];
sRenSpec = [renSpec copy];
}
NSArray* sPairs =
[partSpec componentsSeparatedByCharactersInSet: [NSCharacterSet characterSetWithCharactersInString: @";"] ];
[sRenSpec componentsSeparatedByCharactersInSet: [NSCharacterSet characterSetWithCharactersInString: @";"] ];
for (NSString* sPair in sPairs)
{
bool ret=false;
[PartsInfoMgr reloadWithHideSpec:nil andRenameSpec:nil];
}
static NSString *sHideSpec=nil, *sRenSpec=nil;
+(void) reloadWithHideSpec: (NSString*) hideSpec andRenameSpec:(NSString*) renSpec
{
if (hideSpec!=nil) {

Archive Download the corresponding diff file

Revision: 342