Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a87c668e
Commit
a87c668e
authored
Nov 21, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix preferences reset if unknown version was found
parent
dd4fe674
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+10
-9
No files found.
modules/gui/macosx/intf.m
View file @
a87c668e
...
@@ -1742,16 +1742,17 @@ static const int kCurrentPreferencesVersion = 3;
...
@@ -1742,16 +1742,17 @@ static const int kCurrentPreferencesVersion = 3;
return
;
return
;
}
}
NSArray
*
ourPreferences
=
[
NSArray
arrayWithObjects
:
@"org.videolan.vlc.plist"
,
@"VLC"
,
@"org.videolan.vlc"
,
nil
];
// Do NOT add the current plist file here as this would conflict with caching.
// Instead, just reset below.
/* Move the file to trash so that user can find them later */
NSArray
*
ourPreferences
=
[
NSArray
arrayWithObjects
:
@"org.videolan.vlc"
,
@"VLC"
,
nil
];
[[
NSWorkspace
sharedWorkspace
]
performFileOperation
:
NSWorkspaceRecycleOperation
source
:
preferences
destination
:
nil
files
:
ourPreferences
tag
:
0
];
/* Move the file to trash one by one. Using above array the method would stop after first file
/* really reset the defaults from now on */
not found. */
[
NSUserDefaults
resetStandardUserDefaults
];
for
(
NSString
*
file
in
ourPreferences
)
{
[[
NSWorkspace
sharedWorkspace
]
performFileOperation
:
NSWorkspaceRecycleOperation
source
:
preferences
destination
:
@""
files
:
[
NSArray
arrayWithObject
:
file
]
tag
:
nil
];
}
[
defaults
setInteger
:
kCurrentPreferencesVersion
forKey
:
kVLCPreferencesVersion
];
[
self
resetAndReinitializeUserDefaults
];
[
defaults
synchronize
];
}
}
/* Relaunch now */
/* Relaunch now */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment