* open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: open.m,v 1.17 2003/01/31 02:53:52 jlj Exp $
+ * $Id: open.m,v 1.22 2003/02/09 19:28:43 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
[o_panel setTitle: _NS("Open Source")];
[o_mrl_lbl setTitle: _NS("Media Resource Locator (MRL)")];
- [o_ckbox_enqueue setTitle: _NS("Only enqueue in playlist. Do not play.")];
+ [o_ckbox_enqueue setTitle: _NS("Only enqueue in playlist, do not play")];
[o_btn_ok setTitle: _NS("OK")];
[o_btn_cancel setTitle: _NS("Cancel")];
[o_file_stream setTitle: _NS("Treat as a pipe rather than as a file")];
[o_file_sub_btn_browse setTitle: _NS("Browse...")];
- [o_file_sub_ckbox setTitle: _NS("Load subtitles")];
+ [o_file_sub_ckbox setTitle: _NS("Load subtitles file:")];
[o_disc_device_lbl setStringValue: _NS("Device name")];
[o_disc_title_lbl setStringValue: _NS("Title")];
[o_disc_chapter_lbl setStringValue: _NS("Chapter")];
- [o_disc_videots_btn_browse setStringValue: _NS("Browse...")];
+ [o_disc_videots_btn_browse setTitle: _NS("Browse...")];
[o_disc_dvd_menus setTitle: _NS("Use DVD menus (EXPERIMENTAL)")];
[[o_disc_type cellAtRow:0 column:0] setTitle: _NS("VIDEO_TS folder")];
[[o_sout_access cellAtRow:1 column:0] setTitle: _NS("UDP")];
[[o_sout_access cellAtRow:2 column:0] setTitle: _NS("RTP")];
- [o_sout_file_btn_browse setStringValue: _NS("Browse...")];
+ [o_sout_file_btn_browse setTitle: _NS("Browse...")];
[o_sout_udp_addr_lbl setStringValue: _NS("Address")];
[o_sout_udp_port_lbl setStringValue: _NS("Port")];
int i_result;
[o_tabview selectTabViewItemAtIndex: i_type];
- [o_ckbox_enqueue setState: NSOffState];
+ [o_ckbox_enqueue setState: NSOnState];
[o_file_sub_path setStringValue: @""];
[o_file_sub_ckbox setState: NSOffState];
[o_file_sub_path setEnabled: NO];
}
@end
+
+@implementation VLGetURLScriptCommand
+
+- (id)performDefaultImplementation {
+ NSString *o_command = [[self commandDescription] commandName];
+ NSString *o_urlString = [self directParameter];
+
+ NSLog(@"test1");
+ if ( [o_command isEqualToString:@"GetURL"] || [o_command isEqualToString:@"OpenURL"] )
+ {
+ intf_thread_t * p_intf = [NSApp getIntf];
+ NSLog( o_command );
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return nil;
+ }
+
+ if ( o_urlString )
+ {
+ NSURL * o_url;
+
+ int i_mode = PLAYLIST_INSERT | PLAYLIST_GO;
+
+ playlist_Add( p_playlist, [o_urlString fileSystemRepresentation],
+ i_mode, PLAYLIST_END );
+ NSLog( o_urlString );
+ o_url = [NSURL fileURLWithPath: o_urlString];
+ if( o_url != nil )
+ {
+ [[NSDocumentController sharedDocumentController]
+ noteNewRecentDocumentURL: o_url];
+ }
+ }
+ vlc_object_release( p_playlist );
+ }
+ return nil;
+}
+
+@end
+