]> git.sesse.net Git - vlc/commitdiff
modules/gui/macosx/controls.m:
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 15 Apr 2003 14:05:13 +0000 (14:05 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 15 Apr 2003 14:05:13 +0000 (14:05 +0000)
 * present the open dialog when pressing play button instead of 'standard'
   open dialog, to make users more aware of this dialog and the functions
   it has.
ALL:
 * when opening a file NOT trough the Open dialog, make sure sout and
   suboptions are reset to ""

modules/gui/macosx/controls.m
modules/gui/macosx/intf.m
modules/gui/macosx/open.m
modules/gui/macosx/playlist.m

index f088b08555d0b586ca3569f7190c067cc4882188..ee88c016ba34a2245379553ff87bc1f43d510f7f 100644 (file)
@@ -2,7 +2,7 @@
  * controls.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: controls.m,v 1.30 2003/04/06 23:21:13 massiot Exp $
+ * $Id: controls.m,v 1.31 2003/04/15 14:05:13 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -32,6 +32,7 @@
 
 #include "intf.h"
 #include "vout.h"
+#include "open.h"
 #include "controls.h"
 
 /*****************************************************************************
@@ -65,7 +66,7 @@
         else
         {
             vlc_object_release( p_playlist );
-            [o_open openFile: nil];
+            [o_open openFileGeneric: nil];
         }
     }
 }
index 396b950a4c90ebb983ab64503d4b1cf95fcd2d01..c113e04a248f112ab76a78d4fcb2f0aafb727733 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.69 2003/04/06 23:21:13 massiot Exp $
+ * $Id: intf.m,v 1.70 2003/04/15 14:05:13 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -412,9 +412,16 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
 
 - (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
 {
+    intf_thread_t * p_intf = [NSApp getIntf];
+    
     [o_playlist appendArray:
         [NSArray arrayWithObject: o_filename] atPos: -1 enqueue: NO];
-
+    
+    config_PutPsz( [NSApp getIntf], "sub-file", "" );
+    config_PutInt( p_intf, "sub-delay", 0 );
+    config_PutFloat( p_intf, "sub-fps", 0.0 );
+    config_PutPsz( p_intf, "sout", "" );
+            
     return( TRUE );
 }
 
index 4d520302599c767e6f97785fb5a85d2b7d3a3795..0ffbe6607a28082ee86bcd4b18827a4c7dae327f 100644 (file)
@@ -2,7 +2,7 @@
  * open.m: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: open.m,v 1.28 2003/04/09 14:12:49 hartman Exp $
+ * $Id: open.m,v 1.29 2003/04/15 14:05:13 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -269,7 +269,6 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
     int i_result;
 
     [o_tabview selectTabViewItemAtIndex: i_type];
-    [o_ckbox_enqueue setState: NSOnState];
     [o_file_sub_ckbox setState: NSOffState];
     
     i_result = [NSApp runModalForWindow: o_panel];
@@ -284,6 +283,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
         {
             config_PutPsz( p_intf, "sout", [o_sout lossyCString] );
         }
+        else
+        {
+            config_PutPsz( p_intf, "sout", "" );
+        }
 
         NSString *o_source = [o_mrl stringValue];
         BOOL b_enq = [o_ckbox_enqueue state] == NSOnState ? YES : NO;
@@ -813,6 +816,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
                 sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
         
         [o_playlist appendArray: o_values atPos: -1 enqueue:NO];
+        config_PutPsz( p_intf, "sub-file", "" );
+        config_PutInt( p_intf, "sub-delay", 0 );
+        config_PutFloat( p_intf, "sub-fps", 0.0 );
+        config_PutPsz( p_intf, "sout", "" );
     }
 }
 
index 3d510ea94ba48dad02d15a50a330e8e225961751..b69ba0ad96d1a9ea26bd0c1046e611f2a2f53647 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: playlist.m,v 1.19 2003/04/15 12:40:03 hartman Exp $
+ * $Id: playlist.m,v 1.20 2003/04/15 14:05:13 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Derk-Jan Hartman <thedj@users.sourceforge.net>
         NSArray * o_values;
         NSPasteboard * o_pasteboard;
         
+        intf_thread_t * p_intf = [NSApp getIntf];
         o_pasteboard = [o_info draggingPasteboard];
         
         if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
             o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType]
                         sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
             [self appendArray: o_values atPos: i_proposed_row enqueue:YES];
-        
+            
+            config_PutPsz( p_intf, "sub-file", "" );
+            config_PutInt( p_intf, "sub-delay", 0 );
+            config_PutFloat( p_intf, "sub-fps", 0.0 );
+            config_PutPsz( p_intf, "sout", "" );
+            
             return( YES );
         }