From 9d8a2d05f9d47205bd4e4670e599fb6a5a2ad94d Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman <hartman@videolan.org> Date: Mon, 12 May 2003 01:17:10 +0000 Subject: [PATCH] * First set config variable, then add the files (and therefore potentially play them) in the playlist. Otherwise we can be too late. --- modules/gui/macosx/intf.m | 10 +++++----- modules/gui/macosx/open.m | 11 ++++++----- modules/gui/macosx/playlist.m | 9 +++++---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 02820137b5d8..6c49901abea3 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -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 ); } diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index 1ea323e56613..1132154109a0 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -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]; } } diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index b8ef1c4b5478..071990eefb3f 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -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> @@ -450,13 +450,14 @@ { 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 ); } -- GitLab