]> git.sesse.net Git - vlc/commitdiff
* added an option to keep the selections in the wizard for a single session. It's...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 11 Feb 2006 11:34:31 +0000 (11:34 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 11 Feb 2006 11:34:31 +0000 (11:34 +0000)
modules/gui/macosx/macosx.m
modules/gui/macosx/wizard.h
modules/gui/macosx/wizard.m

index a725696b83c892ab84523230fffb5d9f245a7590..756cfa6bbbe9d8c0b00c74b79652d0d6db280473 100644 (file)
@@ -74,6 +74,11 @@ void E_(CloseVideoGL) ( vlc_object_t * );
 #define BACKGROUND_TEXT N_("Use as Desktop Background")
 #define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
         "of the Finder. Desktop icons cannot be interacted with in this mode." )
+        
+#define WIZARD_OPTIONS_SAVING_TEXT N_("Keep wizard selections")
+#define WIZARD_OPTIONS_SAVING_LONGTEXT N_("Keeps the selections in the " \
+        "wizard for one session of VLC, so you do not need to choose them " \
+        "over and over again for similar purposes.") 
 
 vlc_module_begin();
     set_description( _("Mac OS X interface") );
@@ -83,6 +88,8 @@ vlc_module_begin();
     set_subcategory( SUBCAT_INTERFACE_GENERAL );
     add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
                      VLC_FALSE );
+    add_bool( "macosx-wizard-keep", 1, NULL, WIZARD_OPTIONS_SAVING_TEXT,
+                WIZARD_OPTIONS_SAVING_LONGTEXT, VLC_TRUE );
 
     add_submodule();
         set_description( _("Quartz video") );
index 2a5d62536f4f25db1ae90537a55e4dcedb7b3fe3..55b1656ee7526a3421a06e28df7b928a835a3f0b 100644 (file)
     NSArray * o_encapFormats;
     NSArray * o_strmgMthds;
     NSString * o_opts;
+    
+    BOOL * keepSettingsOrNot;
 }
 - (IBAction)cancelRun:(id)sender;
 - (IBAction)nextTab:(id)sender;
index cde8ccd41f1eebf6e93483b67c2196cdc0ffe032..f9f4e35f6737abb633cc0b60295d9ce905e750ff 100644 (file)
@@ -35,6 +35,7 @@
 #import "intf.h"
 #import "network.h"
 #import "playlist.h"
+#import <vlc/intf.h>
 
 /*****************************************************************************
  * VLCWizard implementation
@@ -296,8 +297,6 @@ static VLCWizard *_o_sharedInstance = nil;
 - (void)showWizard
 {
     /* just present the window to the user */
-    [o_tab_pageHolder selectFirstTabViewItem:self];
-
     [o_wizard_window center];
     [o_wizard_window displayIfNeeded];
     [o_wizard_window makeKeyAndOrderFront:nil];
@@ -305,12 +304,21 @@ static VLCWizard *_o_sharedInstance = nil;
 
 - (void)resetWizard
 {
-    /* reset the wizard-window to its default values */
+    /* get the current state of our setting to keep the selections or not */
+    keepSettingsOrNot = (BOOL *)config_GetInt( VLCIntf, "macosx-wizard-keep" );
 
+    /* go to the front page and clean up a bit */
     [o_userSelections removeAllObjects];
+    [o_btn_forward setTitle: _NS("Next")];
+    [o_tab_pageHolder selectFirstTabViewItem:self];
+
+    
+    if( keepSettingsOrNot )
+        return;
+    
+    /* reset the wizard-window to its default values if wanted */
     [o_t1_matrix_strmgOrTrnscd selectCellAtRow:0 column:0];
     [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setState: NSOffState];
-    [o_btn_forward setTitle: _NS("Next")];
 
     /* "Input" */
     [o_t2_fld_pathToNewStrm setStringValue: @""];