* 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>
- (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];
* 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>
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;
- (IBAction)reportABug:(id)sender;
- (IBAction)openWebsite:(id)sender;
- (IBAction)openLicense:(id)sender;
+- (IBAction)openCrashLog:(id)sender;
- (void)windowDidBecomeKey:(NSNotification *)o_notification;
* 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>
[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")];