* controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: controls.m,v 1.10 2003/01/22 01:48:06 hartman Exp $
+ * $Id: controls.m,v 1.11 2003/01/23 22:25:32 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
- (IBAction)stop:(id)sender;
- (IBAction)faster:(id)sender;
- (IBAction)slower:(id)sender;
+- (IBAction)slowMotion:(id)sender;
- (IBAction)fastForward:(id)sender;
- (IBAction)prev:(id)sender;
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
}
+- (IBAction)slowMotion:(id)sender
+{
+ i_ff++;
+ switch( [[NSApp currentEvent] type] )
+ {
+ case NSPeriodic:
+ if ( i_ff == 1 )
+ {
+ [self slower:sender];
+ }
+ break;
+
+ case NSLeftMouseUp:
+ if ( i_ff > 1 )
+ {
+ intf_thread_t * p_intf = [NSApp getIntf];
+
+ [self faster:sender];
+ if ( p_intf->p_sys->p_input != NULL &&
+ p_intf->p_sys->p_input->stream.control.i_status != PAUSE_S)
+ {
+ input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
+ }
+ }
+ i_ff = 0;
+ break;
+
+ default:
+ break;
+ }
+}
+
- (IBAction)fastForward:(id)sender
{
playlist_t * p_playlist = vlc_object_find( [NSApp getIntf], VLC_OBJECT_PLAYLIST,
* You can set this value in intf.m (hartman)
*/
case NSPeriodic:
- if (i_ff == 1)
+ if ( i_ff == 1 )
{
[self faster:self];
}
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size )
{
- vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Play( p_playlist );
}
+ vlc_mutex_unlock( &p_playlist->object_lock );
break;
default:
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.15 2003/01/22 01:48:06 hartman Exp $
+ * $Id: intf.h,v 1.16 2003/01/23 22:25:32 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
IBOutlet id o_btn_playlist; /* btn playlist */
IBOutlet id o_btn_prev; /* btn previous */
- IBOutlet id o_btn_slower; /* btn slower */
+ IBOutlet id o_btn_slowmotion; /* btn slowmotion */
IBOutlet id o_btn_play; /* btn play */
IBOutlet id o_btn_stop; /* btn stop */
IBOutlet id o_btn_fastforward; /* btn fastforward */
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.31 2003/01/23 21:47:59 massiot Exp $
+ * $Id: intf.m,v 1.32 2003/01/23 22:25:32 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
pTitle = _NS("VLC - Controller");
[o_window setTitle: pTitle];
+ [o_window setExcludedFromWindowsMenu: TRUE];
/* button controls */
[o_btn_playlist setToolTip: _NS("Playlist")];
[o_btn_prev setToolTip: _NS("Previous")];
- [o_btn_slower setToolTip: _NS("Slowmotion")];
+ [o_btn_slowmotion setToolTip: _NS("Slowmotion")];
[o_btn_play setToolTip: _NS("Play")];
[o_btn_stop setToolTip: _NS("Stop")];
[o_btn_fastforward setToolTip: _NS("Fast Forward")];
/* messages panel */
[o_msgs_panel setTitle: _NS("Messages")];
+ [o_msgs_panel setExcludedFromWindowsMenu: TRUE];
[o_msgs_btn_ok setTitle: _NS("Close")];
/* main menu */
/* set control items */
[o_btn_stop setEnabled: b_input];
[o_btn_fastforward setEnabled: b_control];
- [o_btn_slower setEnabled: b_control];
+ [o_btn_slowmotion setEnabled: b_control];
[o_btn_prev setEnabled: b_plmul];
[o_btn_next setEnabled: b_plmul];
[o_controls setVolumeSlider];
* open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: open.m,v 1.13 2003/01/23 21:47:59 massiot Exp $
+ * $Id: open.m,v 1.14 2003/01/23 22:25:32 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
- (IBAction)openFile:(id)sender
{
NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
-
- [o_open_panel setAllowsMultipleSelection: NO];
+
+ [o_open_panel setAllowsMultipleSelection: YES];
[o_open_panel setTitle: _NS("Open File")];
[o_open_panel setPrompt: _NS("Open")];
-
+
if( [o_open_panel runModalForDirectory: nil
file: nil types: nil] == NSOKButton )
{
intf_thread_t * p_intf = [NSApp getIntf];
config_PutPsz( p_intf, "sout", NULL );
- [o_playlist appendArray: [o_open_panel filenames] atPos: -1 enqueue: 0];
+ [o_playlist appendArray: [o_open_panel filenames] atPos: -1 enqueue:VLC_FALSE];
}
}