]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/open.m
Remove access-filter timeshift from OSX open dialog.
[vlc] / modules / gui / macosx / open.m
index 21a81bcf19932fc7bef0324f15385f2687e2b385..617e3775cd25ebb9c1ca8c3abac29b1ecb49d5e5 100644 (file)
@@ -152,6 +152,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
         [self dealloc];
     } else {
         _o_sharedMainInstance = [super init];
+        p_intf = VLCIntf;
     }
  
     return _o_sharedMainInstance;
@@ -159,8 +160,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
 - (void)awakeFromNib
 {
-    intf_thread_t * p_intf = VLCIntf;
-
     [o_panel setTitle: _NS("Open Source")];
     [o_mrl_lbl setTitle: _NS("Media Resource Locator (MRL)")];
 
@@ -194,7 +193,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
     [[o_net_mode cellAtRow:0 column:0] setTitle: _NS("UDP/RTP")];
     [[o_net_mode cellAtRow:1 column:0] setTitle: _NS("UDP/RTP Multicast")];
     [[o_net_mode cellAtRow:2 column:0] setTitle: _NS("HTTP/FTP/MMS/RTSP")];
-    [o_net_timeshift_ckbox setTitle: _NS("Allow timeshifting")];
 
     [o_net_udp_port setIntValue: config_GetInt( p_intf, "server-port" )];
     [o_net_udp_port_stp setIntValue: config_GetInt( p_intf, "server-port" )];
@@ -283,7 +281,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
 - (void)setSubPanel
 {
-    intf_thread_t * p_intf = VLCIntf;
     int i_index;
     module_config_t * p_item;
 
@@ -352,7 +349,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
 - (void)openTarget:(int)i_type
 {
     int i_result;
-    intf_thread_t * p_intf = VLCIntf;
 
     b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
 
@@ -404,22 +400,18 @@ static VLCOpen *_o_sharedMainInstance = nil;
                       [[(VLCOutput *)o_sout_options getMRL] objectAtIndex: i]]];
             }
         }
-        if( [o_net_timeshift_ckbox state] == NSOnState )
-        {
-            [o_options addObject: [NSString stringWithString:
-                                                @"access-filter=timeshift"]];
-        }
         if( [[[o_tabview selectedTabViewItem] label] isEqualToString: _NS("Capture")] )
         {
             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-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-height=%i", [o_screen_height_fld intValue]]];
-                if ([o_screen_follow_mouse_btn state]) {
-                  [o_options addObject: @"screen-follow-mouse"];
-                }
+                if( [o_screen_follow_mouse_ckb intValue] == YES )
+                    [o_options addObject: @"screen-follow-mouse"];
+                else
+                    [o_options addObject: @"no-screen-follow-mouse"];
         }
 
         /* apply the options to our item(s) */
@@ -490,7 +482,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
     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"] ||
         [o_ext isEqualToString: @"cue"] ||
@@ -768,7 +760,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
 {
     NSString *o_mode;
     NSString *o_mrl_string = [NSString string];
-    intf_thread_t * p_intf = VLCIntf;
 
     o_mode = [[o_net_mode selectedCell] title];
 
@@ -850,7 +841,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
         [o_currentCaptureView removeFromSuperviewWithoutNeedingDisplay];
         [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 setAutoresizesSubviews: YES];
     [[[o_tabview tabViewItemAtIndex: 3] view] addSubview: theView];
@@ -883,6 +874,12 @@ static VLCOpen *_o_sharedMainInstance = nil;
     {
         [self showCaptureView: o_screen_view];
         [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"] )
     {
@@ -898,16 +895,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
 - (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_mrl setStringValue: @"screen://"];
 }
 
 - (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: @""] )
-        [o_screen_fps_fld setIntValue: 1];
+        [o_screen_fps_fld setFloatValue: 1.0];
     [o_mrl setStringValue: @"screen://"];
 }