]> git.sesse.net Git - vlc/commitdiff
* Added Step forward/Step backward feature.
authorChristophe Massiot <massiot@videolan.org>
Sun, 9 Feb 2003 01:50:35 +0000 (01:50 +0000)
committerChristophe Massiot <massiot@videolan.org>
Sun, 9 Feb 2003 01:50:35 +0000 (01:50 +0000)
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/controls.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index c82772e4a804ebce3221e580ce1daa429a248060..9127ae6c5395d8f6e0813431e82ef3e2a2886c18 100644 (file)
@@ -4,9 +4,11 @@
         {CLASS = VLCApplication; LANGUAGE = ObjC; SUPERCLASS = NSApplication; }, 
         {
             ACTIONS = {
+                backward = id; 
                 deinterlace = id; 
                 doubleWindow = id; 
                 faster = id; 
+                forward = id; 
                 fullscreen = id; 
                 halfWindow = id; 
                 loop = id; 
@@ -71,6 +73,7 @@
                 "o_messages" = id; 
                 "o_mi_about" = id; 
                 "o_mi_bring_atf" = id; 
+                "o_mi_bwd" = id; 
                 "o_mi_channels" = id; 
                 "o_mi_chapter" = id; 
                 "o_mi_clear" = id; 
@@ -83,6 +86,7 @@
                 "o_mi_double_window" = id; 
                 "o_mi_faster" = id; 
                 "o_mi_fullscreen" = id; 
+                "o_mi_fwd" = id; 
                 "o_mi_half_window" = id; 
                 "o_mi_hide" = id; 
                 "o_mi_hide_others" = id; 
                 "o_mi_vol_down" = id; 
                 "o_mi_vol_up" = id; 
                 "o_mi_website" = id; 
-                "o_msgs_btn_crashog" = id; 
+                "o_msgs_btn_crashlog" = id; 
                 "o_msgs_btn_ok" = id; 
                 "o_msgs_panel" = id; 
                 "o_mu_audio" = id; 
index ffd76159721ab112e7684bcfe66398f42ba9d1a5..a919b65b7d0ed06d8d6e81b025bfe91fd9bf8eca 100644 (file)
@@ -3,11 +3,11 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>590 112 365 441 0 0 1280 1002 </string>
+       <string>469 64 365 441 0 0 1152 746 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>29</key>
-               <string>16 822 419 44 0 0 1280 1002 </string>
+               <string>14 602 419 44 0 0 1152 746 </string>
                <key>303</key>
                <string>60 509 104 114 0 0 1280 1002 </string>
                <key>909</key>
@@ -24,7 +24,6 @@
        <key>IBOpenObjects</key>
        <array>
                <integer>29</integer>
-               <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
        <string>6G30</string>
index bb006f3ff59b7b3ac4cd7ed74384603e0baf4893..740a5bf4f44943ba367ae56022321bf49ef48668 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index 6e91dc426e3e9431b57323ac176ad7f5a6fdad00..00aa465deb47c0d8aa6a3071552043ae4a47557a 100644 (file)
@@ -2,7 +2,7 @@
  * controls.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: controls.m,v 1.24 2003/02/09 01:13:43 massiot Exp $
+ * $Id: controls.m,v 1.25 2003/02/09 01:50:35 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -53,6 +53,9 @@
 - (IBAction)next:(id)sender;
 - (IBAction)loop:(id)sender;
 
+- (IBAction)forward:(id)sender;
+- (IBAction)backward:(id)sender;
+
 - (IBAction)volumeUp:(id)sender;
 - (IBAction)volumeDown:(id)sender;
 - (IBAction)mute:(id)sender;
     vlc_object_release( p_playlist );
 }
 
+- (IBAction)forward:(id)sender
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+    if( p_playlist == NULL || p_playlist->p_input == NULL )
+    {
+        if ( p_playlist != NULL ) vlc_object_release( p_playlist );
+        return;
+    }
+
+    input_Seek( p_playlist->p_input, 5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
+    vlc_object_release( p_playlist );
+}
+
+- (IBAction)backward:(id)sender
+{
+    intf_thread_t * p_intf = [NSApp getIntf];
+    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                       FIND_ANYWHERE );
+    if( p_playlist == NULL || p_playlist->p_input == NULL )
+    {
+        if ( p_playlist != NULL ) vlc_object_release( p_playlist );
+        return;
+    }
+
+    input_Seek( p_playlist->p_input, -5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
+    vlc_object_release( p_playlist );
+}
+
 - (IBAction)volumeUp:(id)sender
 {
     intf_thread_t * p_intf = [NSApp getIntf];
 
         [o_mi setState: i_state];
     }
+    else if( [[o_mi title] isEqualToString: _NS("Step Forward")] ||
+             [[o_mi title] isEqualToString: _NS("Step Backward")] )
+    {
+        if( p_playlist != NULL && p_input != NULL )
+        {
+            vlc_mutex_lock( &p_input->stream.stream_lock );
+            bEnabled = p_input->stream.b_seekable;
+            vlc_mutex_unlock( &p_input->stream.stream_lock );
+        }
+        else
+        {
+            bEnabled = FALSE;
+        }
+    }
     else if( [[o_mi title] isEqualToString: _NS("Mute")] ) 
     {
         [o_mi setState: p_intf->p_sys->b_mute ? NSOnState : NSOffState];
index 3a943ce4c1ad1b8c88de1e1d215ce287a167730e..0b0cf016d504b8cb07c64e247ec5e37187d602df 100644 (file)
@@ -2,7 +2,7 @@
  * intf.h: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.24 2003/02/08 17:26:00 massiot Exp $
+ * $Id: intf.h,v 1.25 2003/02/09 01:50:35 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -159,6 +159,8 @@ struct intf_sys_t
     IBOutlet id o_mi_previous;
     IBOutlet id o_mi_next;
     IBOutlet id o_mi_loop;
+    IBOutlet id o_mi_fwd;
+    IBOutlet id o_mi_bwd;
     IBOutlet id o_mi_program;
     IBOutlet id o_mi_title;
     IBOutlet id o_mi_chapter;
@@ -237,6 +239,7 @@ struct intf_sys_t
 - (IBAction)reportABug:(id)sender;
 - (IBAction)openWebsite:(id)sender;
 - (IBAction)openLicense:(id)sender;
+- (IBAction)openCrashLog:(id)sender;
 
 - (void)windowDidBecomeKey:(NSNotification *)o_notification;
 
index 380d9b4bb74cd1e672b52953fe6bb99ce7588b10..dc74bf368ac5c68f4409c2cfc65d7fc7bfc4e09b 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.51 2003/02/09 01:13:43 massiot Exp $
+ * $Id: intf.m,v 1.52 2003/02/09 01:50:35 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -321,6 +321,8 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
     [o_mi_previous setTitle: _NS("Previous")];
     [o_mi_next setTitle: _NS("Next")];
     [o_mi_loop setTitle: _NS("Loop")];
+    [o_mi_fwd setTitle: _NS("Step Forward")];
+    [o_mi_bwd setTitle: _NS("Step Backward")];
     [o_mi_program setTitle: _NS("Program")];
     [o_mi_title setTitle: _NS("Title")];
     [o_mi_chapter setTitle: _NS("Chapter")];