Commit c62a73d1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: resized to the open dialogue again and cleaned-up the screen input section

parent c5f610c9
...@@ -2,14 +2,28 @@ ...@@ -2,14 +2,28 @@
<!DOCTYPE plist PUBLIC "-//Apple//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"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key>
<string>171 127 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>2297</key>
<string>366 400 548 264 0 0 1280 778 </string>
<key>2301</key>
<string>366 417 548 264 0 0 1280 778 </string>
<key>2304</key>
<string>366 380 547 264 0 0 1280 778 </string>
<key>2346</key>
<string>366 400 548 264 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>677</string> <string>489.0</string>
<key>IBOldestOS</key> <key>IBOldestOS</key>
<integer>5</integer> <integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>678</integer> <integer>636</integer>
<integer>2346</integer> <integer>2346</integer>
<integer>2297</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9G55</string> <string>9G55</string>
......
...@@ -123,23 +123,28 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); ...@@ -123,23 +123,28 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
/* screen support */ /* screen support */
IBOutlet id o_screen_view; IBOutlet id o_screen_view;
IBOutlet id o_screen_fps_fld;
IBOutlet id o_screen_lbl; IBOutlet id o_screen_lbl;
IBOutlet id o_screen_long_lbl; IBOutlet id o_screen_long_lbl;
IBOutlet id o_screen_fps_stp; IBOutlet id o_screen_fps_fld;
IBOutlet id o_screen_fps_lbl; IBOutlet id o_screen_fps_lbl;
IBOutlet id o_screen_fps_stp;
IBOutlet id o_screen_left_fld; IBOutlet id o_screen_left_fld;
IBOutlet id o_screen_left_lbl; IBOutlet id o_screen_left_lbl;
IBOutlet id o_screen_left_stp;
IBOutlet id o_screen_top_fld; IBOutlet id o_screen_top_fld;
IBOutlet id o_screen_top_lbl; IBOutlet id o_screen_top_lbl;
IBOutlet id o_screen_top_stp;
IBOutlet id o_screen_width_fld; IBOutlet id o_screen_width_fld;
IBOutlet id o_screen_width_lbl; IBOutlet id o_screen_width_lbl;
IBOutlet id o_screen_width_stp;
IBOutlet id o_screen_height_fld; IBOutlet id o_screen_height_fld;
IBOutlet id o_screen_height_lbl; IBOutlet id o_screen_height_lbl;
IBOutlet id o_screen_follow_mouse_btn; IBOutlet id o_screen_height_stp;
IBOutlet id o_screen_follow_mouse_ckb;
BOOL b_autoplay; BOOL b_autoplay;
id o_currentCaptureView; id o_currentCaptureView;
intf_thread_t * p_intf;
} }
+ (VLCOpen *)sharedInstance; + (VLCOpen *)sharedInstance;
......
...@@ -152,6 +152,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -152,6 +152,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[self dealloc]; [self dealloc];
} else { } else {
_o_sharedMainInstance = [super init]; _o_sharedMainInstance = [super init];
p_intf = VLCIntf;
} }
return _o_sharedMainInstance; return _o_sharedMainInstance;
...@@ -159,8 +160,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -159,8 +160,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
intf_thread_t * p_intf = VLCIntf;
[o_panel setTitle: _NS("Open Source")]; [o_panel setTitle: _NS("Open Source")];
[o_mrl_lbl setTitle: _NS("Media Resource Locator (MRL)")]; [o_mrl_lbl setTitle: _NS("Media Resource Locator (MRL)")];
...@@ -283,7 +282,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -283,7 +282,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)setSubPanel - (void)setSubPanel
{ {
intf_thread_t * p_intf = VLCIntf;
int i_index; int i_index;
module_config_t * p_item; module_config_t * p_item;
...@@ -352,7 +350,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -352,7 +350,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)openTarget:(int)i_type - (void)openTarget:(int)i_type
{ {
int i_result; int i_result;
intf_thread_t * p_intf = VLCIntf;
b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" ); b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
...@@ -412,14 +409,15 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -412,14 +409,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
if( [[[o_tabview selectedTabViewItem] label] isEqualToString: _NS("Capture")] ) if( [[[o_tabview selectedTabViewItem] label] isEqualToString: _NS("Capture")] )
{ {
if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: _NS("Screen")] ) if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: _NS("Screen")] )
[o_options addObject: [NSString stringWithFormat: @"screen-fps=%i", [o_screen_fps_fld intValue]]]; [o_options addObject: [NSString stringWithFormat: @"screen-fps=%f", [o_screen_fps_fld floatValue]]];
[o_options addObject: [NSString stringWithFormat: @"screen-left=%i", [o_screen_left_fld intValue]]]; [o_options addObject: [NSString stringWithFormat: @"screen-left=%i", [o_screen_left_fld intValue]]];
[o_options addObject: [NSString stringWithFormat: @"screen-top=%i", [o_screen_top_fld intValue]]]; [o_options addObject: [NSString stringWithFormat: @"screen-top=%i", [o_screen_top_fld intValue]]];
[o_options addObject: [NSString stringWithFormat: @"screen-width=%i", [o_screen_width_fld intValue]]]; [o_options addObject: [NSString stringWithFormat: @"screen-width=%i", [o_screen_width_fld intValue]]];
[o_options addObject: [NSString stringWithFormat: @"screen-height=%i", [o_screen_height_fld intValue]]]; [o_options addObject: [NSString stringWithFormat: @"screen-height=%i", [o_screen_height_fld intValue]]];
if ([o_screen_follow_mouse_btn state]) { if( [o_screen_follow_mouse_ckb intValue] == YES )
[o_options addObject: @"screen-follow-mouse"]; [o_options addObject: @"screen-follow-mouse"];
} else
[o_options addObject: @"no-screen-follow-mouse"];
} }
/* apply the options to our item(s) */ /* apply the options to our item(s) */
...@@ -490,7 +488,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -490,7 +488,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
if( b_dir ) if( b_dir )
{ {
o_mrl_string = [NSString stringWithFormat: @"directory://%@", o_filename]; o_mrl_string = [NSString stringWithFormat: @"directory://%@/", o_filename];
} }
else if( [o_ext isEqualToString: @"bin"] || else if( [o_ext isEqualToString: @"bin"] ||
[o_ext isEqualToString: @"cue"] || [o_ext isEqualToString: @"cue"] ||
...@@ -768,7 +766,6 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -768,7 +766,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
{ {
NSString *o_mode; NSString *o_mode;
NSString *o_mrl_string = [NSString string]; NSString *o_mrl_string = [NSString string];
intf_thread_t * p_intf = VLCIntf;
o_mode = [[o_net_mode selectedCell] title]; o_mode = [[o_net_mode selectedCell] title];
...@@ -850,7 +847,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -850,7 +847,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_currentCaptureView removeFromSuperviewWithoutNeedingDisplay]; [o_currentCaptureView removeFromSuperviewWithoutNeedingDisplay];
[o_currentCaptureView release]; [o_currentCaptureView release];
} }
[theView setFrame: NSMakeRect( 0, 10, o_view_rect.size.width, o_view_rect.size.height)]; [theView setFrame: NSMakeRect( 0, -10, o_view_rect.size.width, o_view_rect.size.height)];
[theView setNeedsDisplay: YES]; [theView setNeedsDisplay: YES];
[theView setAutoresizesSubviews: YES]; [theView setAutoresizesSubviews: YES];
[[[o_tabview tabViewItemAtIndex: 3] view] addSubview: theView]; [[[o_tabview tabViewItemAtIndex: 3] view] addSubview: theView];
...@@ -883,6 +880,12 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -883,6 +880,12 @@ static VLCOpen *_o_sharedMainInstance = nil;
{ {
[self showCaptureView: o_screen_view]; [self showCaptureView: o_screen_view];
[o_mrl setStringValue: @"screen://"]; [o_mrl setStringValue: @"screen://"];
[o_screen_height_fld setIntValue: config_GetInt( p_intf, "screen-height" )];
[o_screen_width_fld setIntValue: config_GetInt( p_intf, "screen-width" )];
[o_screen_fps_fld setFloatValue: config_GetFloat( p_intf, "screen-fps" )];
[o_screen_left_fld setIntValue: config_GetInt( p_intf, "screen-left" )];
[o_screen_top_fld setIntValue: config_GetInt( p_intf, "screen-top" )];
[o_screen_follow_mouse_ckb setIntValue: config_GetInt( p_intf, "screen-follow-mouse" )];
} }
else if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: @"iSight"] ) else if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: @"iSight"] )
{ {
...@@ -898,16 +901,16 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -898,16 +901,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)screenStepperChanged:(id)sender - (IBAction)screenStepperChanged:(id)sender
{ {
[o_screen_fps_fld setIntValue: [o_screen_fps_stp intValue]]; [o_screen_fps_fld setFloatValue: [o_screen_fps_stp floatValue]];
[o_panel makeFirstResponder: o_screen_fps_fld]; [o_panel makeFirstResponder: o_screen_fps_fld];
[o_mrl setStringValue: @"screen://"]; [o_mrl setStringValue: @"screen://"];
} }
- (void)screenFPSfieldChanged:(NSNotification *)o_notification - (void)screenFPSfieldChanged:(NSNotification *)o_notification
{ {
[o_screen_fps_stp setIntValue: [o_screen_fps_fld intValue]]; [o_screen_fps_stp setFloatValue: [o_screen_fps_fld floatValue]];
if( [[o_screen_fps_fld stringValue] isEqualToString: @""] ) if( [[o_screen_fps_fld stringValue] isEqualToString: @""] )
[o_screen_fps_fld setIntValue: 1]; [o_screen_fps_fld setFloatValue: 1.0];
[o_mrl setStringValue: @"screen://"]; [o_mrl setStringValue: @"screen://"];
} }
......
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