[vlc-commits] macosx: when resetting VLC's config in the prefs panels, also reset the OS X specific NSDefaults
Felix Paul Kühne
git at videolan.org
Sun Aug 26 14:31:21 CEST 2012
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Aug 26 14:30:31 2012 +0200| [5404917e61a1987d490f9e3342798c88c9e768ca] | committer: Felix Paul Kühne
macosx: when resetting VLC's config in the prefs panels, also reset the OS X specific NSDefaults
(cherry picked from commit 85a9ef4fcb2019f29504900fdb104a60ec995f65)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5404917e61a1987d490f9e3342798c88c9e768ca
---
modules/gui/macosx/prefs.m | 6 ++++++
modules/gui/macosx/simple_prefs.m | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/modules/gui/macosx/prefs.m b/modules/gui/macosx/prefs.m
index 4e842ee..d48525e 100644
--- a/modules/gui/macosx/prefs.m
+++ b/modules/gui/macosx/prefs.m
@@ -238,8 +238,14 @@ static VLCPrefs *_o_sharedMainInstance = nil;
{
if( i_return == NSAlertAlternateReturn )
{
+ /* reset VLC's config */
config_ResetAll( p_intf );
[_rootTreeItem resetView];
+ config_SaveConfigFile( p_intf );
+
+ /* reset OS X defaults */
+ [NSUserDefaults resetStandardUserDefaults];
+ [[NSUserDefaults standardUserDefaults] synchronize];
}
}
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 9f1dc92..a3a1b75 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -774,9 +774,14 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
{
if( i_return == NSAlertAlternateReturn )
{
+ /* reset VLC's config */
config_ResetAll( p_intf );
[self resetControls];
config_SaveConfigFile( p_intf );
+
+ /* reset OS X defaults */
+ [NSUserDefaults resetStandardUserDefaults];
+ [[NSUserDefaults standardUserDefaults] synchronize];
}
}
More information about the vlc-commits
mailing list