Commit 0b9a75bc authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* More support for handling URLs. Still need to create the scriptsuite.

parent aa2280f6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.h: MacOS X plugin for vlc * open.h: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: open.h,v 1.9 2003/01/26 14:53:08 hartman Exp $ * $Id: open.h,v 1.10 2003/02/05 02:31:27 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>
...@@ -131,3 +131,6 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); ...@@ -131,3 +131,6 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
- (IBAction)openFile:(id)sender; - (IBAction)openFile:(id)sender;
@end @end
@interface VLGetURLScriptCommand : NSScriptCommand
@end
...@@ -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 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: open.m,v 1.18 2003/02/01 23:46:24 massiot Exp $ * $Id: open.m,v 1.19 2003/02/05 02:31:27 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>
...@@ -288,7 +288,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -288,7 +288,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[o_tabview selectTabViewItemAtIndex: i_type]; [o_tabview selectTabViewItemAtIndex: i_type];
[o_ckbox_enqueue setState: NSOffState]; [o_ckbox_enqueue setState: NSOffState];
[o_file_sub_path setStringValue: @""]; [o_file_sub_path setStringValue: @""];
[o_file_sub_ckbox setState: NSOffState]; [o_file_sub_ckbox setState: NSOnState];
[o_file_sub_path setEnabled: NO]; [o_file_sub_path setEnabled: NO];
[o_file_sub_btn_browse setEnabled: NO]; [o_file_sub_btn_browse setEnabled: NO];
...@@ -872,3 +872,31 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -872,3 +872,31 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
} }
@end @end
@implementation VLGetURLScriptCommand
- (id)performDefaultImplementation {
NSString *command = [[self commandDescription] commandName];
NSString *urlString = [self directParameter];
if ( [command isEqualToString:@"GetURL"] )
{
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return nil;
}
[p_playlist appendArray:
[NSArray arrayWithObject: urlString] atPos: -1 enqueue:NO];
vlc_object_release( p_playlist );
}
return nil;
}
@end
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