]> git.sesse.net Git - vlc/commitdiff
* modules/gui/macosx/prefs.?:
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 6 Jun 2003 00:38:41 +0000 (00:38 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 6 Jun 2003 00:38:41 +0000 (00:38 +0000)
  - 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
modules/gui/macosx/prefs.m

index 75c834337bb175fa0e487ac71a420cd7bcdb1f77..b3748fb59ae8bdb0445fdbc47accb40f39430614 100644 (file)
@@ -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 <jon-vl@nanocrew.net> 
  *
@@ -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;
index c428864a48dcbeb8b1a5ac3a5bfd972cbd6abbb4..20d6293cebb41b896e94387d58709160ca6e6676 100644 (file)
@@ -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 <jon-vl@nanocrew.net>
  *             Derk-Jan Hartman <thedj at users.sf.net>
 
 - (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
                 }
                 [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]];