Chameleon Applications

Chameleon Applications Commit Details

Date:2010-01-25 21:40:12 (14 years 2 months ago)
Author:Rekursor
Commit:57
Parents: 56
Message:Released version 2.0.b3 that should fix priviledge exec potential problems and also potential problems with differents preferences file version between 1.0 and 2.0 panels
Changes:
M/trunk/ChameleonPrefPane/bin/OSX105/Chameleon.prefPane.zip
M/trunk/ChameleonPrefPane/Sources/BootSetupController.mm
M/trunk/ChameleonPrefPane/bin/OSX106/Chameleon.prefPane.zip
M/trunk/ChameleonPrefPane/Sources/PropertyList.cpp
M/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
M/trunk/ChameleonPrefPane/English.lproj/Chameleon.xib
M/trunk/ChameleonPrefPane/bin/version
M/trunk/ChameleonPrefPane/Sources/BootFlagsController.mm

File differences

trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
3030
3131
3232
33
33
3434
3535
3636
static const char* const szPropFileName = "com.apple.Boot.plist";
static const int CurrentPreferencesFileVersion = 0x01; // for future back compatibility
static const int CurrentPreferencesFileVersion = 0x02; // for future back compatibility
//--------------------------------------------------------------------------
// Static file variables
//--------------------------------------------------------------------------
trunk/ChameleonPrefPane/Sources/BootFlagsController.mm
3939
4040
4141
42
42
4343
4444
4545
}
//--------------------------------------------------------------------------
-(void) setDefaultsValues: (NSMutableDictionary*) dict
-(void) setDefaultsValues: (NSMutableDictionary*) dict
{
}
//--------------------------------------------------------------------------
trunk/ChameleonPrefPane/Sources/BootSetupController.mm
5050
5151
5252
53
5453
5554
5655
......
5857
5958
6059
61
60
61
6262
6363
6464
[dict setObject:[[NSNumber alloc] initWithBool: false] forKey: keyUseFrozenParts];
[dict setObject:[[NSString alloc] initWithString: @""] forKey: keyForceBootConfigPath];
}
//--------------------------------------------------------------------------
-(void) loadOptionsFromPreferencesFile: (NSMutableDictionary*) dict
{
[mSwapHD02 setIntValue: [[dict objectForKey:keySwapHD02] intValue]];
[mFreezeParts setIntValue: [[dict objectForKey: keyUseFrozenParts] intValue] ];
id obj = [dict objectForKey: keyForceBootConfigPath];
[mBootConfigPathText setStringValue: obj ];
if(obj)[mBootConfigPathText setStringValue: obj ];
else[dict setObject:[[NSString alloc] initWithString: @""] forKey: keyForceBootConfigPath];
int val = ([[mBootConfigPathText stringValue] length] >0 ? 1 : 0);
[mBootConfigPath setIntValue: val];
trunk/ChameleonPrefPane/Sources/PropertyList.cpp
100100
101101
102102
103
103
104
104105
105106
106107
......
113114
114115
115116
116
117
118
117
118
119
120
121
122
119123
120124
121125
}
//--------------------------------------------------------------------------
// Execute a priviledge shell command
// Execute a priviledge shell command : will wait for execution termination
// by calling wait()
//--------------------------------------------------------------------------
bool executePrivilegedCmd(AuthorizationRef auth,
const char* pathToTool,
// Execute Cmd
OSStatus status = AuthorizationExecuteWithPrivileges(auth, pathToTool,flags, (char**)argv, NULL);
// Cleanup mem
// Wait for the child process of AEWP to terminate:
int wait_status=0;
/* pid_t pid = */
wait(&wait_status);
// usleep(10000); // 10 ms
// Cleanup mem
for (int i=0; argv[i]; i++) free ((void*) argv[i]);
return status ? false : true;
trunk/ChameleonPrefPane/bin/version
1
1
2.0.b2
2.0.b3
trunk/ChameleonPrefPane/English.lproj/Chameleon.xib
8585
8686
8787
88
88
8989
9090
9191
<object class="NSTextFieldCell" key="NSCell" id="98357325">
<int key="NSCellFlags">72482368</int>
<int key="NSCellFlags2">138544128</int>
<string key="NSContents">Version 2.0 b2</string>
<string key="NSContents">Version 2.0 b3</string>
<object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>

Archive Download the corresponding diff file

Revision: 57