Commit 495da295 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

modules/gui/macosx/controls.m:

 * 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 ""
parent 6211bea3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin * controls.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "intf.h" #include "intf.h"
#include "vout.h" #include "vout.h"
#include "open.h"
#include "controls.h" #include "controls.h"
/***************************************************************************** /*****************************************************************************
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
else else
{ {
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
[o_open openFile: nil]; [o_open openFileGeneric: nil];
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -412,9 +412,16 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg ) ...@@ -412,9 +412,16 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename - (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
{ {
intf_thread_t * p_intf = [NSApp getIntf];
[o_playlist appendArray: [o_playlist appendArray:
[NSArray arrayWithObject: o_filename] atPos: -1 enqueue: NO]; [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 ); return( TRUE );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc * open.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -269,7 +269,6 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -269,7 +269,6 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
int i_result; int i_result;
[o_tabview selectTabViewItemAtIndex: i_type]; [o_tabview selectTabViewItemAtIndex: i_type];
[o_ckbox_enqueue setState: NSOnState];
[o_file_sub_ckbox setState: NSOffState]; [o_file_sub_ckbox setState: NSOffState];
i_result = [NSApp runModalForWindow: o_panel]; i_result = [NSApp runModalForWindow: o_panel];
...@@ -284,6 +283,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -284,6 +283,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
{ {
config_PutPsz( p_intf, "sout", [o_sout lossyCString] ); config_PutPsz( p_intf, "sout", [o_sout lossyCString] );
} }
else
{
config_PutPsz( p_intf, "sout", "" );
}
NSString *o_source = [o_mrl stringValue]; NSString *o_source = [o_mrl stringValue];
BOOL b_enq = [o_ckbox_enqueue state] == NSOnState ? YES : NO; BOOL b_enq = [o_ckbox_enqueue state] == NSOnState ? YES : NO;
...@@ -813,6 +816,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -813,6 +816,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
[o_playlist appendArray: o_values atPos: -1 enqueue:NO]; [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", "" );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin * playlist.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net> * Derk-Jan Hartman <thedj@users.sourceforge.net>
...@@ -442,6 +442,7 @@ ...@@ -442,6 +442,7 @@
NSArray * o_values; NSArray * o_values;
NSPasteboard * o_pasteboard; NSPasteboard * o_pasteboard;
intf_thread_t * p_intf = [NSApp getIntf];
o_pasteboard = [o_info draggingPasteboard]; o_pasteboard = [o_info draggingPasteboard];
if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] ) if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
...@@ -449,7 +450,12 @@ ...@@ -449,7 +450,12 @@
o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType] o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
[self appendArray: o_values atPos: i_proposed_row enqueue:YES]; [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 ); return( YES );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment