Commit 2397666a authored by Christophe Massiot's avatar Christophe Massiot

* Updated aout3 developer doc.

* Reworked the Open... menu items, and added the ability to use libdvdplay.
* Sound output menu is now under Controls.
parent bb57136a
This diff is collapsed.
......@@ -48,6 +48,7 @@
"o_mi_copy" = id;
"o_mi_cut" = id;
"o_mi_deinterlace" = id;
"o_mi_device" = id;
"o_mi_faster" = id;
"o_mi_fullscreen" = id;
"o_mi_hide" = id;
......@@ -60,6 +61,7 @@
"o_mi_next" = id;
"o_mi_open_disc" = id;
"o_mi_open_file" = id;
"o_mi_open_generic" = id;
"o_mi_open_net" = id;
"o_mi_open_recent" = id;
"o_mi_open_recent_cm" = id;
......@@ -99,8 +101,7 @@
openDiscStepperChanged = id;
openDiscTypeChanged = id;
openFile = id;
openFileBrowse = id;
openFilePathChanged = id;
openFileGeneric = id;
openNet = id;
openNetModeChanged = id;
openNetStepperChanged = id;
......
......@@ -7,7 +7,7 @@
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>281 485 308 44 0 0 1152 746 </string>
<string>333 594 308 44 0 0 1152 746 </string>
<key>303</key>
<string>93 566 72 114 0 0 1600 1178 </string>
</dict>
......
......@@ -145,18 +145,18 @@ OSStatus streamListenerProc (AudioStreamID inStream,
// Build a menu
NSMenuItem *newItem;
newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"Sound output" action:NULL keyEquivalent:@""];
newMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"Sound output"];
[newItem setSubmenu:newMenu];
[[NSApp mainMenu] addItem:newItem];
[newItem release];
newItem = [main getMIDevice]; //[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"Sound output" action:NULL keyEquivalent:@""];
newMenu = [newItem submenu]; //[[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"Sound output"];
//[newItem setSubmenu:newMenu];
//[[NSApp mainMenu] addItem:newItem];
//[newItem release];
// check which devices can do what class of audio
// struct mosx_AudioDeviceData deviceData;
for(i=0; i<devicesAvailable; i++)
[self CheckDevice:deviceList[i] isInput:false]; // only check the output part
[newMenu release];
//[newMenu release];
free(deviceList);
};
return me;
......
......@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf.h,v 1.4 2002/12/07 23:50:30 massiot Exp $
* $Id: intf.h,v 1.5 2002/12/08 23:38:02 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -106,6 +106,7 @@ struct intf_sys_t
IBOutlet id o_mu_file;
IBOutlet id o_mi_open_file;
IBOutlet id o_mi_open_generic;
IBOutlet id o_mi_open_disc;
IBOutlet id o_mi_open_net;
IBOutlet id o_mi_open_recent;
......@@ -135,6 +136,7 @@ struct intf_sys_t
IBOutlet id o_mi_vol_down;
IBOutlet id o_mi_mute;
IBOutlet id o_mi_channels;
IBOutlet id o_mi_device;
IBOutlet id o_mi_fullscreen;
IBOutlet id o_mi_screen;
IBOutlet id o_mi_deinterlace;
......@@ -178,6 +180,8 @@ struct intf_sys_t
- (IBAction)viewPreferences:(id)sender;
- (id)getMIDevice;
@end
@interface VLCMain (Internal)
......
......@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf.m,v 1.8 2002/12/08 05:30:47 jlj Exp $
* $Id: intf.m,v 1.9 2002/12/08 23:38:02 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -195,9 +195,10 @@ static void Run( intf_thread_t *p_intf )
[o_mi_quit setTitle: _NS("Quit vlc")];
[o_mu_file setTitle: _NS("File")];
[o_mi_open_file setTitle: _NS("Open File")];
[o_mi_open_disc setTitle: _NS("Open Disc")];
[o_mi_open_net setTitle: _NS("Open Network")];
[o_mi_open_file setTitle: _NS("Open File...")];
[o_mi_open_generic setTitle: _NS("Open Generic...")];
[o_mi_open_disc setTitle: _NS("Open Disc...")];
[o_mi_open_net setTitle: _NS("Open Network...")];
[o_mi_open_recent setTitle: _NS("Open Recent")];
[o_mi_open_recent_cm setTitle: _NS("Clear Menu")];
......@@ -913,6 +914,11 @@ static void Run( intf_thread_t *p_intf )
[o_prefs createPrefPanel: @"main"];
}
- (id)getMIDevice
{
return o_mi_device;
}
@end
@implementation VLCMain (NSMenuValidation)
......
......@@ -2,7 +2,7 @@
* open.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: open.h,v 1.2 2002/10/05 00:10:17 jlj Exp $
* $Id: open.h,v 1.3 2002/12/08 23:38:02 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -73,6 +73,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
- (void)openTarget:(int)i_type;
- (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi;
- (IBAction)openFileGeneric:(id)sender;
- (IBAction)openFile:(id)sender;
- (void)openFilePathChanged:(NSNotification *)o_notification;
......
......@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: open.m,v 1.3 2002/10/05 00:10:17 jlj Exp $
* $Id: open.m,v 1.4 2002/12/08 23:38:02 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -237,7 +237,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
}
}
- (IBAction)openFile:(id)sender
- (IBAction)openFileGeneric:(id)sender
{
[self openFilePathChanged: nil];
[self openTarget: 0];
......@@ -274,13 +274,13 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
o_type = [[o_disc_type selectedCell] title];
if( [o_type isEqualToString: @"DVD"] )
if( [o_type isEqualToString: @"VCD"] )
{
psz_class = kIODVDMediaClass;
psz_class = kIOCDMediaClass;
}
else
{
psz_class = kIOCDMediaClass;
psz_class = kIODVDMediaClass;
}
o_devices = GetEjectableMediaOfClass( psz_class );
......@@ -303,7 +303,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
else
{
[o_disc_device setStringValue:
[NSString stringWithFormat: @"No %@s found", o_type]];
[NSString stringWithFormat: @"No %@ found", o_type]];
}
}
......@@ -337,9 +337,22 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
o_device = [o_disc_device stringValue];
i_title = [o_disc_title intValue];
i_chapter = [o_disc_chapter intValue];
if( [o_type isEqualToString: @"VCD"] )
{
o_type = [NSString stringWithCString: "vcd"];
}
else if ( [o_type isEqualToString: @"DVD"] )
{
o_type = [NSString stringWithCString: "dvdold"];
}
else
{
o_type = [NSString stringWithCString: "dvdplay"];
}
o_mrl_string = [NSString stringWithFormat: @"%@://%@@%i,%i",
[o_type lowercaseString], o_device, i_title, i_chapter];
o_type, o_device, i_title, i_chapter];
[o_mrl setStringValue: o_mrl_string];
}
......@@ -473,6 +486,19 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
}
}
- (IBAction)openFile:(id)sender
{
NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
[o_open_panel setAllowsMultipleSelection: NO];
if( [o_open_panel runModalForDirectory: nil
file: nil types: nil] == NSOKButton )
{
[o_playlist appendArray: [o_open_panel filenames] atPos: -1];
}
}
- (IBAction)panelCancel:(id)sender
{
[NSApp stopModalWithCode: 0];
......
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