]> git.sesse.net Git - vlc/commitdiff
* First set config variable, then add the files (and therefore potentially
authorDerk-Jan Hartman <hartman@videolan.org>
Mon, 12 May 2003 01:17:10 +0000 (01:17 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Mon, 12 May 2003 01:17:10 +0000 (01:17 +0000)
  play them) in the playlist. Otherwise we can be too late.

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

index 02820137b5d8a8a6481b2cdb1d7c88dd49a25226..6c49901abea3b3b428e3bf806f235c3dcd96c0be 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.81 2003/05/11 23:17:30 hartman Exp $
+ * $Id: intf.m,v 1.82 2003/05/12 01:17:10 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -429,13 +429,13 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
 {
     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_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", "" );
+    
+    [o_playlist appendArray:
+        [NSArray arrayWithObject: o_filename] atPos: -1 enqueue: NO];
             
     return( TRUE );
 }
index 1ea323e566133432fd32c4659633335601d95173..1132154109a05b806dd1344fb67eccd14692e201 100644 (file)
@@ -2,7 +2,7 @@
  * open.m: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: open.m,v 1.32 2003/05/08 17:13:22 massiot Exp $
+ * $Id: open.m,v 1.33 2003/05/12 01:17:10 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -235,9 +235,6 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
         BOOL b_enq = [o_ckbox_enqueue state] == NSOnState ? YES : NO;
         NSString *subPath = [o_file_sub_path stringValue];
         
-        [o_playlist appendArray: 
-            [NSArray arrayWithObject: o_source] atPos: -1 enqueue:b_enq];
-        
         if (([o_file_sub_ckbox state] == NSOnState) && !([subPath isEqualTo: @""]))
         {
             config_PutPsz( p_intf, "sub-file", strdup( [subPath cString] ) );
@@ -253,6 +250,9 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
             config_PutInt( p_intf, "sub-delay", 0 );
             config_PutFloat( p_intf, "sub-fps", 0.0 );
         }
+        
+        [o_playlist appendArray: 
+            [NSArray arrayWithObject: o_source] atPos: -1 enqueue:b_enq];
     }
 }
 
@@ -623,11 +623,12 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
         NSArray *o_values = [[o_open_panel filenames]
                 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", "" );
+        
+        [o_playlist appendArray: o_values atPos: -1 enqueue:NO];
     }
 }
 
index b8ef1c4b547835a8bb3941051da3b326f6786aa5..071990eefb3f113fcac8d4d2feaac4e8f684b622 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: playlist.m,v 1.21 2003/04/29 20:17:12 hartman Exp $
+ * $Id: playlist.m,v 1.22 2003/05/12 01:17:10 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Derk-Jan Hartman <thedj@users.sourceforge.net>
         {
             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", "" );
-            
+
+            [self appendArray: o_values atPos: i_proposed_row enqueue:YES];
+
             return( YES );
         }