vlc | branch: master | Felix Paul Kühne <[email protected]> | Fri May 17 
23:19:36 2013 +0200| [72e343b3bfb94e493b1c21c8f4849aeb8cb98928] | committer: 
Felix Paul Kühne

macosx: bump plist version to avoid exceptions when upgrading from 2.0.x or 
2.1-git

No explicit settings performed by the user are affected, so most won't notice 
except for reset window positions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72e343b3bfb94e493b1c21c8f4849aeb8cb98928
---

 modules/gui/macosx/intf.m |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index a42a22b..c07c779 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1871,7 +1871,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 - (void)removeOldPreferences
 {
     static NSString * kVLCPreferencesVersion = @"VLCPreferencesVersion";
-    static const int kCurrentPreferencesVersion = 2;
+    static const int kCurrentPreferencesVersion = 3;
     NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
     int version = [defaults integerForKey:kVLCPreferencesVersion];
     if (version >= kCurrentPreferencesVersion)
@@ -1885,6 +1885,13 @@ static VLCMain *_o_sharedMainInstance = nil;
             return;
         else
             config_SaveConfigFile(VLCIntf); // we need to do manually, since 
we won't quit libvlc cleanly
+    } else if (version == 2) {
+        /* version 2 (used by VLC 2.0.x and early versions of 2.1) can lead to 
exceptions within 2.1 or later
+         * so we reset the OS X specific prefs here - in practice, no user 
will notice */
+        [NSUserDefaults resetStandardUserDefaults];
+
+        [defaults setInteger:kCurrentPreferencesVersion 
forKey:kVLCPreferencesVersion];
+        [defaults synchronize];
     } else {
         NSArray *libraries = 
NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
             NSUserDomainMask, YES);

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to