Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h =================================================================== --- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h (revision 17) +++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h (revision 18) @@ -29,13 +29,14 @@ IBOutlet NSBox* mOptions; IBOutlet SFAuthorizationView *authView; - NSImage * mMacOSXImage; - NSImage * mWindowsImage; - NSImage * mLinuxImage; - NSImage * mUnknownImage; - NSImage * mCDROMImage; - NSMutableDictionary *mOptionsDict; - NSString * mOptionsPlistPath; + NSImage* mMacOSXImage; + NSImage* mWindowsImage; + NSImage* mLinuxImage; + NSImage* mUnknownImage; + NSImage* mCDROMImage; + NSMutableDictionary* mOptionsDict; + NSString* mOptionsPlistPath; + int mPreferenceFileVersion; } Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 17) +++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 18) @@ -30,6 +30,8 @@ static const char* const kRenamePartition = "Rename Partition"; static const NSString* const kPreferencesFilePath = @"/Library/Preferences/com.chameleon.prefPane.plist"; +static const NSString* const keyPreferencesFileVersion = @"version"; // for future back compatibility +static const int CurrentPreferencesFileVersion = 0x01; // for future back compatibility static const NSString* const keyForceBootConfigPath = @"forceBootConfigPath"; static const NSString* const keySwapHD01 = @"swapHD01"; static const NSString* const keySwapHD02 = @"swapHD02"; @@ -113,6 +115,7 @@ kPreferencesFilePath ] retain]; if (oldGlobalPreferences!=nil) { + mPreferenceFileVersion= [[oldGlobalPreferences objectForKey: keyPreferencesFileVersion] intValue ]; [mSwapHD01 setIntValue: [[oldGlobalPreferences objectForKey: keySwapHD01] intValue]]; [mSwapHD02 setIntValue: [[oldGlobalPreferences objectForKey: keySwapHD02] intValue]]; [mFreezeParts setIntValue: [[oldGlobalPreferences objectForKey: keyUseFrozenParts] intValue] ]; @@ -125,6 +128,8 @@ // Initialize defaults oldGlobalPreferences = [[NSMutableDictionary alloc] init]; + [oldGlobalPreferences setObject: [[NSNumber alloc] initWithInt: CurrentPreferencesFileVersion] + forKey: keyPreferencesFileVersion]; [oldGlobalPreferences setObject: [[NSNumber alloc] initWithBool: false] forKey: keySwapHD01]; [oldGlobalPreferences setObject: [[NSNumber alloc] initWithBool: false] forKey: keySwapHD02]; [oldGlobalPreferences setObject:[[NSNumber alloc] initWithBool: false] forKey: keyUseFrozenParts];