},
{
ACTIONS = {
+ loadSubsChanged = id;
openDisc = id;
openDiscMenusChanged = id;
openDiscStepperChanged = id;
openNet = id;
openNetModeChanged = id;
openNetStepperChanged = id;
+ openSubBrowse = id;
openVTSBrowse = id;
panelCancel = id;
panelOk = id;
OUTLETS = {
"o_btn_cancel" = id;
"o_btn_ok" = id;
+ "o_ckbox_enqueue" = id;
"o_disc_chapter" = id;
"o_disc_chapter_lbl" = id;
"o_disc_chapter_stp" = id;
"o_file_btn_browse" = id;
"o_file_path" = id;
"o_file_stream" = id;
+ "o_file_sub_btn_browse" = id;
+ "o_file_sub_ckbox" = id;
+ "o_file_sub_path" = id;
"o_mrl" = id;
"o_mrl_lbl" = id;
"o_net_cs_addr" = id;
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>451 372 365 441 0 0 1280 1002 </string>
+ <string>642 60 365 441 0 0 1280 1002 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
- <string>14 602 374 44 0 0 1152 746 </string>
+ <string>16 822 374 44 0 0 1280 1002 </string>
<key>303</key>
<string>60 509 104 66 0 0 1280 1002 </string>
<key>909</key>
- <string>343 411 430 172 0 0 1152 746 </string>
+ <string>425 600 430 172 0 0 1280 1002 </string>
<key>915</key>
- <string>392 471 93 96 0 0 1152 746 </string>
+ <string>439 657 93 96 0 0 1280 1002 </string>
</dict>
<key>IBFramework Version</key>
<string>291.0</string>
</array>
<key>IBOpenObjects</key>
<array>
- <integer>909</integer>
- <integer>21</integer>
- <integer>915</integer>
<integer>636</integer>
- <integer>29</integer>
+ <integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>6G30</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>ogg</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>generic.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>OGG file</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>cue</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>generic.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>CUE file</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.26 2003/01/16 13:49:44 hartman Exp $
+ * $Id: intf.m,v 1.27 2003/01/20 03:45:06 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
{
[o_playlist appendArray:
- [NSArray arrayWithObject: o_filename] atPos: -1];
+ [NSArray arrayWithObject: o_filename] atPos: -1 enqueue: NO];
return( TRUE );
}
* open.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: open.h,v 1.6 2003/01/06 02:45:09 massiot Exp $
+ * $Id: open.h,v 1.7 2003/01/20 03:45:06 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
IBOutlet id o_btn_ok;
IBOutlet id o_btn_cancel;
+ IBOutlet id o_ckbox_enqueue;
IBOutlet id o_file_path;
IBOutlet id o_file_btn_browse;
IBOutlet id o_file_stream;
+ IBOutlet id o_file_sub_path;
+ IBOutlet id o_file_sub_btn_browse;
+ IBOutlet id o_file_sub_ckbox;
IBOutlet id o_disc_type;
IBOutlet id o_disc_device;
- (void)openFilePathChanged:(NSNotification *)o_notification;
- (IBAction)openFileBrowse:(id)sender;
- (IBAction)openFileStreamChanged:(id)sender;
+- (IBAction)loadSubsChanged:(id)sender;
+- (IBAction)openSubBrowse:(id)sender;
- (IBAction)openDisc:(id)sender;
- (IBAction)openDiscTypeChanged:(id)sender;
* open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: open.m,v 1.10 2003/01/18 04:57:08 hartman Exp $
+ * $Id: open.m,v 1.11 2003/01/20 03:45:06 hartman 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_btn_ok setTitle: _NS("OK")];
[o_btn_cancel setTitle: _NS("Cancel")];
[o_file_btn_browse setTitle: _NS("Browse...")];
[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_disc_device_lbl setStringValue: _NS("Device name")];
[o_disc_title_lbl setStringValue: _NS("Title")];
[o_disc_chapter_lbl setStringValue: _NS("Chapter")];
int i_result;
[o_tabview selectTabViewItemAtIndex: i_type];
-
+ [o_ckbox_enqueue setState: NSOffState];
+ [o_file_sub_path setStringValue: @""];
+ [o_file_sub_ckbox setState: NSOffState];
+ [o_file_sub_path setEnabled: NO];
+ [o_file_sub_btn_browse setEnabled: NO];
+
i_result = [NSApp runModalForWindow: o_panel];
[o_panel close];
if( i_result )
{
NSString *o_sout = [o_sout_mrl stringValue];
-
+ intf_thread_t * p_intf = [NSApp getIntf];
+
if ( [o_sout_cbox state] )
{
- intf_thread_t * p_intf = [NSApp getIntf];
config_PutPsz( p_intf, "sout", [o_sout lossyCString] );
}
NSString *o_source = [o_mrl stringValue];
-
+ 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];
+ [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] ) );
}
[self soutModeChanged: nil];
[self openFilePathChanged: nil];
}
+- (IBAction)loadSubsChanged:(id)sender
+{
+ if ([o_file_sub_ckbox state] == NSOnState)
+ {
+ [o_file_sub_path setEnabled:YES];
+ [o_file_sub_btn_browse setEnabled:YES];
+ }
+ else
+ {
+ [o_file_sub_path setEnabled:NO];
+ [o_file_sub_btn_browse setEnabled:NO];
+ }
+}
+
+- (IBAction)openSubBrowse:(id)sender
+{
+ NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
+
+ [o_open_panel setAllowsMultipleSelection: NO];
+ [o_open_panel setTitle: _NS("Open File")];
+ [o_open_panel setPrompt: _NS("Open")];
+
+ if( [o_open_panel runModalForDirectory: nil
+ file: nil types: nil] == NSOKButton )
+ {
+ NSString *o_filename = [[o_open_panel filenames] objectAtIndex: 0];
+ [o_file_sub_path setStringValue: o_filename];
+ }
+}
+
- (IBAction)openDiscTypeChanged:(id)sender
{
NSString *o_type;
- (IBAction)openFile:(id)sender
{
- NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
-
- [o_open_panel setAllowsMultipleSelection: NO];
- [o_open_panel setTitle: _NS("Open File")];
- [o_open_panel setPrompt: _NS("Open")];
-
- if( [o_open_panel runModalForDirectory: nil
- file: nil types: nil] == NSOKButton )
- {
- intf_thread_t * p_intf = [NSApp getIntf];
- config_PutPsz( p_intf, "sout", NULL );
- [o_playlist appendArray: [o_open_panel filenames] atPos: -1];
- }
+ [self openFilePathChanged: nil];
+ [self openTarget: 0];
}
- (IBAction)panelCancel:(id)sender
* playlist.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: playlist.h,v 1.3 2003/01/16 13:49:44 hartman Exp $
+ * $Id: playlist.h,v 1.4 2003/01/20 03:45:06 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
- (IBAction)deleteItems:(id)sender;
- (IBAction)selectAll:(id)sender;
-- (void)appendArray:(NSArray*)o_array atPos:(int)i_pos;
+- (void)appendArray:(NSArray*)o_array atPos:(int)i_pos enqueue:(BOOL)b_enqueue;
- (void)playlistUpdated;
@end
* playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: playlist.m,v 1.3 2003/01/05 03:21:50 jlj Exp $
+ * $Id: playlist.m,v 1.4 2003/01/20 03:45:06 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
{
o_values = [o_pasteboard propertyListForType: NSFilenamesPboardType];
- [self appendArray: o_values atPos: i_row];
+ [self appendArray: o_values atPos: i_row enqueue:YES];
return( YES );
}
[o_table_view selectAll: nil];
}
-- (void)appendArray:(NSArray*)o_array atPos:(int)i_pos
+- (void)appendArray:(NSArray*)o_array atPos:(int)i_pos enqueue:(BOOL)b_enqueue
{
int i_items;
NSString * o_value;
{
NSURL * o_url;
- int i_mode = i_items == 0 ? PLAYLIST_INSERT | PLAYLIST_GO :
- PLAYLIST_INSERT;
+ int i_mode = PLAYLIST_INSERT;
+
+ if (i_items == 0 && !b_enqueue)
+ i_mode |= PLAYLIST_GO;
playlist_Add( p_playlist, [o_value fileSystemRepresentation],
i_mode, i_pos == -1 ? PLAYLIST_END : i_pos + i_items );