]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/open.m
* forgot these 2 files
[vlc] / modules / gui / macosx / open.m
index 4bbbbd53e660e6411969ec15d48a5eeac3676fd9..aad5cac01e1a6afa5bd15f74f11fc69a293d0b70 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * open.m: MacOS X module for vlc
  *****************************************************************************
- * Copyright (C) 2002-2003 VideoLAN
+ * Copyright (C) 2002-2005 the VideoLAN team
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
@@ -147,11 +147,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
     return _o_sharedMainInstance;
 }
 
-- (void)getReady
-{
-    [NSBundle loadNibNamed:@"Open" owner:self];
-}
-
 - (void)awakeFromNib
 {
     intf_thread_t * p_intf = VLCIntf;
@@ -188,6 +183,7 @@ 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" )];
@@ -358,6 +354,11 @@ 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"]];
+        }
         [o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"];
         [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO];
     }
@@ -600,7 +601,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
             o_mrl_string = [NSString stringWithFormat: @"dvdnav://%@",
                             o_device]; 
         else
-            o_mrl_string = [NSString stringWithFormat: @"dvdread://%@@%i:%i",
+            o_mrl_string = [NSString stringWithFormat: @"dvdread://%@@%i:%i-",
                             o_device, i_title, i_chapter]; 
     }
     else /* VIDEO_TS folder */
@@ -650,7 +651,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
     o_mode = [[o_net_mode selectedCell] title];
 
-    if( [o_mode isEqualToString: _NS("UDP/RTP")] ) b_udp = TRUE;   
+    if( [o_mode isEqualToString: _NS("UDP/RTP")] ) b_udp = TRUE;
     else if( [o_mode isEqualToString: _NS("UDP/RTP Multicast")] ) b_udpm = TRUE;
     else if( [o_mode isEqualToString: _NS("HTTP/FTP/MMS/RTSP")] ) b_http = TRUE;
 
@@ -723,7 +724,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
         else
             o_mrl_string = o_url;
     }
-
     [o_mrl setStringValue: o_mrl_string];
 }