From 2c5fba48b49a69d9611295d4c20daa9afedc51e0 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Fri, 6 Jun 2003 00:38:41 +0000 Subject: [PATCH] * modules/gui/macosx/prefs.?: - Changed modules list to use Default instead of None. probably clearer to users. - Have a warning before resetting the prefs. --- modules/gui/macosx/prefs.h | 3 ++- modules/gui/macosx/prefs.m | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/gui/macosx/prefs.h b/modules/gui/macosx/prefs.h index 75c834337b..b3748fb59a 100644 --- a/modules/gui/macosx/prefs.h +++ b/modules/gui/macosx/prefs.h @@ -2,7 +2,7 @@ * prefs.h: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2002-2003 VideoLAN - * $Id: prefs.h,v 1.9 2003/05/26 14:59:37 hartman Exp $ + * $Id: prefs.h,v 1.10 2003/06/06 00:38:41 hartman Exp $ * * Authors: Jon Lech Johansen * @@ -64,6 +64,7 @@ - (IBAction)savePrefs: (id)sender; - (IBAction)closePrefs: (id)sender; - (IBAction)resetAll: (id)sender; +- (void)sheetDidEnd:(NSWindow *)o_sheet returnCode:(int)i_return contextInfo:(void *)o_context; - (IBAction)advancedToggle: (id)sender; - (void)showViewForID: (int) i_id andName:(NSString *)o_item_name; - (void)configChanged:(id)o_unknown; diff --git a/modules/gui/macosx/prefs.m b/modules/gui/macosx/prefs.m index c428864a48..20d6293ceb 100644 --- a/modules/gui/macosx/prefs.m +++ b/modules/gui/macosx/prefs.m @@ -2,7 +2,7 @@ * prefs.m: MacOS X plugin for vlc ***************************************************************************** * Copyright (C) 2002-2003 VideoLAN - * $Id: prefs.m,v 1.30 2003/05/26 14:59:37 hartman Exp $ + * $Id: prefs.m,v 1.31 2003/06/06 00:38:41 hartman Exp $ * * Authors: Jon Lech Johansen * Derk-Jan Hartman @@ -98,7 +98,20 @@ - (IBAction)resetAll: (id)sender { - config_ResetAll( p_intf ); + NSBeginInformationalAlertSheet(_NS("Reset Preferences"), @"Cancel", @"Continue", + nil, o_prefs_window, self, @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil, + _NS("Beware this will reset your VLC Media Player config file.\n" + "Are you sure you want to continue?") ); +} + +- (void)sheetDidEnd:(NSWindow *)o_sheet returnCode:(int)i_return contextInfo:(void *)o_context +{ + if( i_return == NSAlertAlternateReturn ) + { + config_ResetAll( p_intf ); + [self showViewForID: [[o_tree itemAtRow:[o_tree selectedRow]] getObjectID] + andName: [[o_tree itemAtRow:[o_tree selectedRow]] getName]]; + } } - (IBAction)advancedToggle: (id)sender @@ -345,7 +358,7 @@ } [o_view addSubview: [o_modules autorelease]]; - [o_modules addItemWithTitle: _NS("None")]; + [o_modules addItemWithTitle: _NS("Default")]; [[o_modules lastItem] setTag: -1]; [o_modules selectItem: [o_modules lastItem]]; -- 2.39.2