Commit 21575d49 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* ./modules/gui/macosx/controls.m

  - changed the slower button into a slowmotion button
  - fixed a forgotten mutex_unlock
* ./modules/gui/macosx/intf.m
  - added the slowmotion button
  - some windows shouldn't register in the "Window" menu
* ./modules/gui/macosx/open.m
  - allow multiple file selection
parent 8aa9a6a3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin * controls.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
- (IBAction)stop:(id)sender; - (IBAction)stop:(id)sender;
- (IBAction)faster:(id)sender; - (IBAction)faster:(id)sender;
- (IBAction)slower:(id)sender; - (IBAction)slower:(id)sender;
- (IBAction)slowMotion:(id)sender;
- (IBAction)fastForward:(id)sender; - (IBAction)fastForward:(id)sender;
- (IBAction)prev:(id)sender; - (IBAction)prev:(id)sender;
...@@ -158,6 +159,38 @@ ...@@ -158,6 +159,38 @@
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER ); 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 - (IBAction)fastForward:(id)sender
{ {
playlist_t * p_playlist = vlc_object_find( [NSApp getIntf], VLC_OBJECT_PLAYLIST, playlist_t * p_playlist = vlc_object_find( [NSApp getIntf], VLC_OBJECT_PLAYLIST,
...@@ -173,7 +206,7 @@ ...@@ -173,7 +206,7 @@
* You can set this value in intf.m (hartman) * You can set this value in intf.m (hartman)
*/ */
case NSPeriodic: case NSPeriodic:
if (i_ff == 1) if ( i_ff == 1 )
{ {
[self faster:self]; [self faster:self];
} }
...@@ -192,9 +225,9 @@ ...@@ -192,9 +225,9 @@
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size ) if( p_playlist->i_size )
{ {
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Play( p_playlist ); playlist_Play( p_playlist );
} }
vlc_mutex_unlock( &p_playlist->object_lock );
break; break;
default: default:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin * intf.h: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -97,7 +97,7 @@ struct intf_sys_t ...@@ -97,7 +97,7 @@ struct intf_sys_t
IBOutlet id o_btn_playlist; /* btn playlist */ IBOutlet id o_btn_playlist; /* btn playlist */
IBOutlet id o_btn_prev; /* btn previous */ 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_play; /* btn play */
IBOutlet id o_btn_stop; /* btn stop */ IBOutlet id o_btn_stop; /* btn stop */
IBOutlet id o_btn_fastforward; /* btn fastforward */ IBOutlet id o_btn_fastforward; /* btn fastforward */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -191,11 +191,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -191,11 +191,12 @@ static void Run( intf_thread_t *p_intf )
pTitle = _NS("VLC - Controller"); pTitle = _NS("VLC - Controller");
[o_window setTitle: pTitle]; [o_window setTitle: pTitle];
[o_window setExcludedFromWindowsMenu: TRUE];
/* button controls */ /* button controls */
[o_btn_playlist setToolTip: _NS("Playlist")]; [o_btn_playlist setToolTip: _NS("Playlist")];
[o_btn_prev setToolTip: _NS("Previous")]; [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_play setToolTip: _NS("Play")];
[o_btn_stop setToolTip: _NS("Stop")]; [o_btn_stop setToolTip: _NS("Stop")];
[o_btn_fastforward setToolTip: _NS("Fast Forward")]; [o_btn_fastforward setToolTip: _NS("Fast Forward")];
...@@ -207,6 +208,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -207,6 +208,7 @@ static void Run( intf_thread_t *p_intf )
/* messages panel */ /* messages panel */
[o_msgs_panel setTitle: _NS("Messages")]; [o_msgs_panel setTitle: _NS("Messages")];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE];
[o_msgs_btn_ok setTitle: _NS("Close")]; [o_msgs_btn_ok setTitle: _NS("Close")];
/* main menu */ /* main menu */
...@@ -642,7 +644,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -642,7 +644,7 @@ static void Run( intf_thread_t *p_intf )
/* set control items */ /* set control items */
[o_btn_stop setEnabled: b_input]; [o_btn_stop setEnabled: b_input];
[o_btn_fastforward setEnabled: b_control]; [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_prev setEnabled: b_plmul];
[o_btn_next setEnabled: b_plmul]; [o_btn_next setEnabled: b_plmul];
[o_controls setVolumeSlider]; [o_controls setVolumeSlider];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc * open.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -844,17 +844,17 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -844,17 +844,17 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
- (IBAction)openFile:(id)sender - (IBAction)openFile:(id)sender
{ {
NSOpenPanel *o_open_panel = [NSOpenPanel openPanel]; 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 setTitle: _NS("Open File")];
[o_open_panel setPrompt: _NS("Open")]; [o_open_panel setPrompt: _NS("Open")];
if( [o_open_panel runModalForDirectory: nil if( [o_open_panel runModalForDirectory: nil
file: nil types: nil] == NSOKButton ) file: nil types: nil] == NSOKButton )
{ {
intf_thread_t * p_intf = [NSApp getIntf]; intf_thread_t * p_intf = [NSApp getIntf];
config_PutPsz( p_intf, "sout", NULL ); 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];
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment