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 @@
* 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];
}
}
}
......
......@@ -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 );
}
......
......@@ -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", "" );
}
}
......
......@@ -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>
......@@ -442,6 +442,7 @@
NSArray * o_values;
NSPasteboard * o_pasteboard;
intf_thread_t * p_intf = [NSApp getIntf];
o_pasteboard = [o_info draggingPasteboard];
if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
......@@ -450,6 +451,11 @@
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 );
}
......
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