Commit 6a5fc04e authored by Felix Paul Kühne's avatar Felix Paul Kühne

Redesign the Capture Device panel

Complete l10n to be done later on
parent 566d7d2f
......@@ -186,6 +186,7 @@
ACTIONS = {
checkForUpdate = id;
clearRecentItems = id;
intfOpenCapture = id;
intfOpenDisc = id;
intfOpenFile = id;
intfOpenFileGeneric = id;
......@@ -286,6 +287,7 @@
"o_mi_mute" = id;
"o_mi_next" = id;
"o_mi_normal_window" = id;
"o_mi_open_capture" = id;
"o_mi_open_disc" = id;
"o_mi_open_file" = id;
"o_mi_open_generic" = id;
......
......@@ -4,6 +4,11 @@
<dict>
<key>IBDocumentLocation</key>
<string>429 441 496 337 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>64 734 438 44 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>489.0</string>
<key>IBLastKnownRelativeProjectPath</key>
......@@ -12,6 +17,7 @@
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>21</integer>
<integer>2416</integer>
</array>
......
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },
{
ACTIONS = {showPanel = id; };
CLASS = FirstResponder;
LANGUAGE = ObjC;
SUPERCLASS = NSObject;
},
{
CLASS = MPSlider;
LANGUAGE = ObjC;
SUPERCLASS = NSSlider;
},
{
ACTIONS = {
showPanel = id;
};
CLASS = VLAboutBox;
LANGUAGE = ObjC;
SUPERCLASS = NSObject;
},
{CLASS = VLBrushedMetalImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
{CLASS = VLCApplication; LANGUAGE = ObjC; SUPERCLASS = NSApplication; },
{CLASS = VLCControllerView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = VLCControllerWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; },
{
CLASS = VLBrushedMetalImageView;
LANGUAGE = ObjC;
SUPERCLASS = NSImageView;
},
{
CLASS = VLCApplication;
LANGUAGE = ObjC;
SUPERCLASS = NSApplication;
},
{
CLASS = VLCControllerView;
LANGUAGE = ObjC;
SUPERCLASS = NSView;
},
{
CLASS = VLCControllerWindow;
LANGUAGE = ObjC;
SUPERCLASS = NSWindow;
},
{
ACTIONS = {
backward = id;
......@@ -241,6 +267,8 @@
ACTIONS = {
eyetvLaunch = id;
eyetvSwitchChannel = id;
openCaptureModeChanged = id;
openCaptureStepperChanged = id;
openDisc = id;
openDiscMenusChanged = id;
openDiscStepperChanged = id;
......@@ -268,6 +296,10 @@
OUTLETS = {
"o_btn_cancel" = id;
"o_btn_ok" = id;
"o_capture_label_view" = id;
"o_capture_lbl" = id;
"o_capture_long_lbl" = id;
"o_capture_mode_pop" = id;
"o_disc_chapter" = id;
"o_disc_chapter_lbl" = id;
"o_disc_chapter_stp" = id;
......@@ -286,12 +318,11 @@
"o_eyetv_currentChannel_lbl" = id;
"o_eyetv_launchEyeTV_btn" = id;
"o_eyetv_nextProgram_btn" = id;
"o_eyetv_noDeviceLong_lbl" = id;
"o_eyetv_noDevice_lbl" = id;
"o_eyetv_noEyeTVLong_lbl" = id;
"o_eyetv_noEyeTV_lbl" = id;
"o_eyetv_noInstanceLong_lbl" = id;
"o_eyetv_noInstance_lbl" = id;
"o_eyetv_notLaunched_view" = id;
"o_eyetv_previousProgram_btn" = id;
"o_eyetv_tabView" = id;
"o_eyetv_running_view" = id;
"o_file_btn_browse" = id;
"o_file_path" = id;
"o_file_stream" = id;
......@@ -333,12 +364,21 @@
"o_output_ckbox" = id;
"o_panel" = id;
"o_playlist" = id;
"o_screen_fps_fld" = id;
"o_screen_fps_stp" = id;
"o_screen_lbl" = id;
"o_screen_long_lbl" = id;
"o_screen_view" = id;
"o_sout_options" = id;
"o_tabview" = id;
};
SUPERCLASS = NSObject;
},
{CLASS = VLCOpenTextField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
{
CLASS = VLCOpenTextField;
LANGUAGE = ObjC;
SUPERCLASS = NSTextField;
},
{
ACTIONS = {
announceChanged = id;
......@@ -404,10 +444,23 @@
};
SUPERCLASS = NSObject;
},
{CLASS = VLCPlaylist; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
{
ACTIONS = {advancedToggle = id; closePrefs = id; resetAll = id; savePrefs = id; };
CLASS = VLCPlaylist;
LANGUAGE = ObjC;
SUPERCLASS = NSObject;
},
{
CLASS = VLCPlaylistView;
LANGUAGE = ObjC;
SUPERCLASS = NSOutlineView;
},
{
ACTIONS = {
advancedToggle = id;
closePrefs = id;
resetAll = id;
savePrefs = id;
};
CLASS = VLCPrefs;
LANGUAGE = ObjC;
OUTLETS = {
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>-8 61 505 517 0 0 800 578 </string>
<key>IBEditorPositions</key>
<dict>
<key>2297</key>
<string>366 463 548 183 0 0 1280 778 </string>
<key>2301</key>
<string>646 594 548 183 0 0 1280 778 </string>
<key>2304</key>
<string>427 454 547 183 0 0 1280 778 </string>
<key>2346</key>
<string>366 464 548 183 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>489.0</string>
<key>IBLockedObjects</key>
......@@ -15,9 +26,12 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>2301</integer>
<integer>2297</integer>
<integer>636</integer>
<integer>2346</integer>
</array>
<key>IBSystem Version</key>
<string>8R3032</string>
<string>9D34</string>
</dict>
</plist>
......@@ -182,6 +182,7 @@ struct intf_sys_t
IBOutlet id o_mi_open_generic;
IBOutlet id o_mi_open_disc;
IBOutlet id o_mi_open_net;
IBOutlet id o_mi_open_capture;
IBOutlet id o_mi_open_recent;
IBOutlet id o_mi_open_recent_cm;
IBOutlet id o_mi_open_wizard;
......@@ -358,6 +359,7 @@ struct intf_sys_t
- (IBAction)intfOpenFileGeneric:(id)sender;
- (IBAction)intfOpenDisc:(id)sender;
- (IBAction)intfOpenNet:(id)sender;
- (IBAction)intfOpenCapture:(id)sender;
- (IBAction)showWizard:(id)sender;
- (IBAction)showExtended:(id)sender;
......
......@@ -673,6 +673,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_mi_open_file setTitle: _NS("Quick Open File...")];
[o_mi_open_disc setTitle: _NS("Open Disc...")];
[o_mi_open_net setTitle: _NS("Open Network...")];
[o_mi_open_capture setTitle: _NS("Open Capture Device...")];
[o_mi_open_recent setTitle: _NS("Open Recent")];
[o_mi_open_recent_cm setTitle: _NS("Clear Menu")];
[o_mi_open_wizard setTitle: _NS("Streaming/Exporting Wizard...")];
......@@ -1910,6 +1911,18 @@ static VLCMain *_o_sharedMainInstance = nil;
}
}
- (IBAction)intfOpenCapture:(id)sender
{
if( !nib_open_loaded )
{
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
[o_open awakeFromNib];
[o_open openCapture];
} else {
[o_open openCapture];
}
}
- (IBAction)showWizard:(id)sender
{
if( !nib_wizard_loaded )
......
/*****************************************************************************
* open.h: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2002-2007 the VideoLAN team
* Copyright (C) 2002-2008 the VideoLAN team
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -101,21 +101,34 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
IBOutlet id o_file_sub_font_box;
IBOutlet id o_file_sub_file_box;
/* open eyetv support */
IBOutlet id o_eyetv_tabView;
/* generic capturing stuff */
IBOutlet id o_capture_lbl;
IBOutlet id o_capture_long_lbl;
IBOutlet id o_capture_mode_pop;
IBOutlet id o_capture_label_view;
/* eyetv support */
IBOutlet id o_eyetv_notLaunched_view;
IBOutlet id o_eyetv_running_view;
IBOutlet id o_eyetv_channels_pop;
IBOutlet id o_eyetv_currentChannel_lbl;
IBOutlet id o_eyetv_chn_status_txt;
IBOutlet id o_eyetv_chn_bgbar;
IBOutlet id o_eyetv_launchEyeTV_btn;
IBOutlet id o_eyetv_nextProgram_btn;
IBOutlet id o_eyetv_noDevice_lbl;
IBOutlet id o_eyetv_noDeviceLong_lbl;
IBOutlet id o_eyetv_noEyeTV_lbl;
IBOutlet id o_eyetv_noEyeTVLong_lbl;
IBOutlet id o_eyetv_noInstance_lbl;
IBOutlet id o_eyetv_noInstanceLong_lbl;
IBOutlet id o_eyetv_previousProgram_btn;
/* screen support */
IBOutlet id o_screen_view;
IBOutlet id o_screen_fps_fld;
IBOutlet id o_screen_lbl;
IBOutlet id o_screen_long_lbl;
IBOutlet id o_screen_fps_stp;
BOOL b_autoplay;
id o_currentCaptureView;
}
+ (VLCOpen *)sharedInstance;
......@@ -143,6 +156,10 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
- (IBAction)openNetStepperChanged:(id)sender;
- (void)openNetInfoChanged:(NSNotification *)o_notification;
- (void)openCapture;
- (void)showCaptureView: theView;
- (IBAction)openCaptureStepperChanged:(id)sender;
- (IBAction)openCaptureModeChanged:(id)sender;
- (IBAction)eyetvSwitchChannel:(id)sender;
- (IBAction)eyetvLaunch:(id)sender;
- (void)eyetvChanged:(NSNotification *)o_notification;
......
/*****************************************************************************
* open.m: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2002-2007 the VideoLAN team
* Copyright (C) 2002-2008 the VideoLAN team
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -45,6 +45,14 @@
#import "output.h"
#import "eyetv.h"
#define setEyeTVUnconnected \
[o_capture_lbl setStringValue: _NS("No device connected")]; \
[o_capture_long_lbl setStringValue: _NS("VLC could not detect any EyeTV compatible device.\n\nCheck the device's connection, make sure that the latest EyeTV software is installed and try again.")]; \
[o_capture_lbl displayIfNeeded]; \
[o_capture_long_lbl displayIfNeeded]; \
[self showCaptureView: o_capture_label_view]
/*****************************************************************************
* GetEjectableMediaOfClass
*****************************************************************************/
......@@ -162,6 +170,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[[o_tabview tabViewItemAtIndex: 0] setLabel: _NS("File")];
[[o_tabview tabViewItemAtIndex: 1] setLabel: _NS("Disc")];
[[o_tabview tabViewItemAtIndex: 2] setLabel: _NS("Network")];
[[o_tabview tabViewItemAtIndex: 3] setLabel: _NS("Capture")];
[o_file_btn_browse setTitle: _NS("Browse...")];
[o_file_stream setTitle: _NS("Treat as a pipe rather than as a file")];
......@@ -191,7 +200,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_net_udp_port_stp setIntValue: config_GetInt( p_intf, "server-port" )];
[o_eyetv_chn_bgbar setUsesThreadedAnimation: YES];
/* FIXME: implement EyeTV l10n here */
/* FIXME: implement Capturing l10n here completely */
[o_capture_mode_pop removeAllItems];
if( MACOS_VERSION > 10.4f )
[o_capture_mode_pop addItemWithTitle: _NS("iSight")];
[o_capture_mode_pop addItemWithTitle: _NS("Screen")];
[o_capture_mode_pop addItemWithTitle: @"EyeTV"];
[o_screen_lbl setStringValue: _NS("Screen Capture Input")];
[o_screen_long_lbl setStringValue: _NS("This facility allows you to process your screen's output.")];
[self setSubPanel];
......@@ -235,19 +252,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
name: NSControlTextDidChangeNotification
object: o_net_http_url];
/* wake up with the correct EyeTV GUI */
if( [[[VLCMain sharedInstance] getEyeTVController] isEyeTVrunning] == YES )
{
if( [[[VLCMain sharedInstance] getEyeTVController] isDeviceConnected] == YES )
{
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"eyetvup"];
[self setupChannelInfo];
}
else
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"nodevice"];
}
else
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"noeyetv"];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(screenFPSChanged:)
name: NSControlTextDidChangeNotification
object: o_screen_fps_fld];
[[NSDistributedNotificationCenter defaultCenter] addObserver: self
selector: @selector(eyetvChanged:)
......@@ -414,9 +422,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
[self openNetInfoChanged: nil];
}
else if( [o_label isEqualToString: _NS("EyeTV")] )
else if( [o_label isEqualToString: _NS("Capture")] )
{
[o_mrl setStringValue: @"eyetv://"];
[self openCaptureModeChanged: nil];
}
}
......@@ -438,6 +446,13 @@ static VLCOpen *_o_sharedMainInstance = nil;
[self openTarget: 2];
}
- (void)openCapture
{
[self openCaptureModeChanged: nil];
[self showCaptureView: o_capture_label_view];
[self openTarget: 3];
}
- (void)openFilePathChanged:(NSNotification *)o_notification
{
NSString *o_mrl_string;
......@@ -801,6 +816,68 @@ static VLCOpen *_o_sharedMainInstance = nil;
}
}
- (void)showCaptureView: theView
{
NSRect o_view_rect;
o_view_rect = [theView frame];
if( o_currentCaptureView )
{
[o_currentCaptureView removeFromSuperviewWithoutNeedingDisplay];
[o_currentCaptureView release];
}
[theView setFrame: NSMakeRect( 0, 10, o_view_rect.size.width, o_view_rect.size.height)];
[theView setNeedsDisplay: YES];
[theView setAutoresizesSubviews: YES];
[[[o_tabview tabViewItemAtIndex: 3] view] addSubview: theView];
[theView displayIfNeeded];
o_currentCaptureView = theView;
[o_currentCaptureView retain];
}
- (IBAction)openCaptureModeChanged:(id)sender
{
if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: @"EyeTV"] )
{
if( [[[VLCMain sharedInstance] getEyeTVController] isEyeTVrunning] == YES )
{
if( [[[VLCMain sharedInstance] getEyeTVController] isDeviceConnected] == YES )
{
[self showCaptureView: o_eyetv_running_view];
[self setupChannelInfo];
}
else
{
setEyeTVUnconnected;
}
}
else
[self showCaptureView: o_eyetv_notLaunched_view];
[o_mrl setStringValue: @""];
}
else if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: @"Screen"] )
{
[self showCaptureView: o_screen_view];
[o_mrl setStringValue: [NSString stringWithFormat:@"screen:// :screen-fps=%@", [o_screen_fps_fld stringValue]]];
}
else if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: @"iSight"] )
{
[o_capture_lbl setStringValue: _NS("iSight Capture Input")];
[o_capture_long_lbl setStringValue: _NS("This facility allows you to process your iSight's input signal.\n\nNo settings are available in this version, so you will be provided a 640px*480px raw video stream.\n\nLive Audio input is not supported.")];
[o_capture_lbl displayIfNeeded];
[o_capture_long_lbl displayIfNeeded];
[self showCaptureView: o_capture_label_view];
[o_mrl setStringValue: @"qtcapture://"];
}
}
- (IBAction)openCaptureStepperChanged:(id)sender
{
[o_screen_fps_fld setIntValue: [o_screen_fps_stp intValue]];
[o_panel makeFirstResponder: o_screen_fps_fld];
[o_mrl setStringValue: [NSString stringWithFormat:@"screen:// :screen-fps=%@", [o_screen_fps_fld stringValue]]];
}
- (IBAction)eyetvSwitchChannel:(id)sender
{
if( sender == o_eyetv_nextProgram_btn )
......@@ -835,7 +912,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
if( [[o_notification name] isEqualToString: @"DeviceAdded"] )
{
msg_Dbg( VLCIntf, "eyetv device was added" );
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"eyetvup"];
[self showCaptureView: o_eyetv_running_view];
[self setupChannelInfo];
}
else if( [[o_notification name] isEqualToString: @"DeviceRemoved"] )
......@@ -843,19 +920,19 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* leave the channel selection like that,
* switch to our "no device" tab */
msg_Dbg( VLCIntf, "eyetv device was removed" );
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"nodevice"];
setEyeTVUnconnected;
}
else if( [[o_notification name] isEqualToString: @"PluginQuit"] )
{
/* switch to the "launch eyetv" tab */
msg_Dbg( VLCIntf, "eyetv was terminated" );
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"noeyetv"];
[self showCaptureView: o_eyetv_notLaunched_view];
}
else if( [[o_notification name] isEqualToString: @"PluginInit"] )
{
/* we got no device yet */
msg_Dbg( VLCIntf, "eyetv was launched, no device yet" );
[o_eyetv_tabView selectTabViewItemWithIdentifier:@"nodevice"];
setEyeTVUnconnected;
}
else
msg_Warn( VLCIntf, "unknown external notify '%s' received", [[o_notification name] UTF8String] );
......
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