Commit f42c15f0 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* ./extras/MacOSX/vlc.pbproj/project.pbxproj

  - Added .cue and .ogg to the known filetypes
ALL:
  - When files are added they are not automatically played anymore. They are always queue'ed and optionally played.
  - Preliminary divx filesubtitle support.
parent 2ea3cbd3
......@@ -121,6 +121,7 @@
},
{
ACTIONS = {
loadSubsChanged = id;
openDisc = id;
openDiscMenusChanged = id;
openDiscStepperChanged = id;
......@@ -132,6 +133,7 @@
openNet = id;
openNetModeChanged = id;
openNetStepperChanged = id;
openSubBrowse = id;
openVTSBrowse = id;
panelCancel = id;
panelOk = id;
......@@ -145,6 +147,7 @@
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;
......@@ -160,6 +163,9 @@
"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;
......
......@@ -3,17 +3,17 @@
<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>
......@@ -23,11 +23,8 @@
</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>
......
......@@ -124,6 +124,18 @@
<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>
......@@ -136,6 +148,18 @@
<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>
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -300,7 +300,7 @@ static void Run( intf_thread_t *p_intf )
- (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 );
}
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -42,10 +42,14 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
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;
......@@ -98,6 +102,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
- (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;
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -168,6 +168,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[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")];
......@@ -179,6 +180,9 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[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")];
......@@ -285,6 +289,11 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
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];
......@@ -292,17 +301,22 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
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];
......@@ -389,6 +403,36 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[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;
......@@ -797,19 +841,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
- (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
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -55,7 +55,7 @@
- (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
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -98,7 +98,7 @@
{
o_values = [o_pasteboard propertyListForType: NSFilenamesPboardType];
[self appendArray: o_values atPos: i_row];
[self appendArray: o_values atPos: i_row enqueue:YES];
return( YES );
}
......@@ -196,7 +196,7 @@
[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;
......@@ -221,8 +221,10 @@
{
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 );
......
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