Commit 336fb035 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx: directly set "key-action" variable where we can.

parent 52638891
...@@ -117,7 +117,6 @@ ...@@ -117,7 +117,6 @@
- (IBAction)play:(id)sender - (IBAction)play:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = pl_Yield( p_intf ); playlist_t * p_playlist = pl_Yield( p_intf );
...@@ -134,8 +133,7 @@ ...@@ -134,8 +133,7 @@
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
val.i_int = config_GetInt( p_intf, "key-play-pause" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
/* Small helper method */ /* Small helper method */
...@@ -165,10 +163,8 @@ ...@@ -165,10 +163,8 @@
- (IBAction)stop:(id)sender - (IBAction)stop:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-stop" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_STOP );
var_Set( p_intf->p_libvlc, "key-pressed", val );
/* Close the window directly, because we do know that there /* Close the window directly, because we do know that there
* won't be anymore video. It's currently waiting a bit. */ * won't be anymore video. It's currently waiting a bit. */
[[[self getVoutView] window] orderOut:self]; [[[self getVoutView] window] orderOut:self];
...@@ -176,34 +172,26 @@ ...@@ -176,34 +172,26 @@
- (IBAction)faster:(id)sender - (IBAction)faster:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-faster" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_FASTER );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
- (IBAction)slower:(id)sender - (IBAction)slower:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-slower" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_SLOWER );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
- (IBAction)prev:(id)sender - (IBAction)prev:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-prev" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PREV );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
- (IBAction)next:(id)sender - (IBAction)next:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-next" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_NEXT );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
- (IBAction)random:(id)sender - (IBAction)random:(id)sender
...@@ -384,47 +372,38 @@ ...@@ -384,47 +372,38 @@
- (IBAction)forward:(id)sender - (IBAction)forward:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-jump+short" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_FORWARD_SHORT );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
- (IBAction)backward:(id)sender - (IBAction)backward:(id)sender
{ {
vlc_value_t val; vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-jump-short" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_BACKWARD_SHORT );
var_Set( p_intf->p_libvlc, "key-pressed", val );
} }
- (IBAction)volumeUp:(id)sender - (IBAction)volumeUp:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-vol-up" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP );
var_Set( p_intf->p_libvlc, "key-pressed", val );
/* Manage volume status */ /* Manage volume status */
[o_main manageVolumeSlider]; [o_main manageVolumeSlider];
} }
- (IBAction)volumeDown:(id)sender - (IBAction)volumeDown:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-vol-down" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN );
var_Set( p_intf->p_libvlc, "key-pressed", val );
/* Manage volume status */ /* Manage volume status */
[o_main manageVolumeSlider]; [o_main manageVolumeSlider];
} }
- (IBAction)mute:(id)sender - (IBAction)mute:(id)sender
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-vol-mute" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_VOL_MUTE );
var_Set( p_intf->p_libvlc, "key-pressed", val );
/* Manage volume status */ /* Manage volume status */
[o_main manageVolumeSlider]; [o_main manageVolumeSlider];
} }
...@@ -446,10 +425,8 @@ ...@@ -446,10 +425,8 @@
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_vout != NULL ) if( p_vout != NULL )
{ {
vlc_value_t val;
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
val.i_int = config_GetInt( p_intf, "key-position" ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_POSITION );
var_Set( p_intf, "key-pressed", val );
vlc_object_release( (vlc_object_t *)p_vout ); vlc_object_release( (vlc_object_t *)p_vout );
} }
} }
......
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