Commit a689b532 authored by Thijs Alkemade's avatar Thijs Alkemade Committed by Felix Paul Kühne

gui/macosx: Added menu item to set playback rate back to normal

Close #1122
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent d3ebbe58
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,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)normalSpeed:(id)sender;
- (IBAction)prev:(id)sender; - (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender; - (IBAction)next:(id)sender;
......
...@@ -184,6 +184,12 @@ ...@@ -184,6 +184,12 @@
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_SLOWER ); var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_SLOWER );
} }
- (IBAction)normalSpeed:(id)sender
{
intf_thread_t * p_intf = VLCIntf;
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_RATE_NORMAL );
}
- (IBAction)prev:(id)sender - (IBAction)prev:(id)sender
{ {
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
...@@ -1016,7 +1022,8 @@ ...@@ -1016,7 +1022,8 @@
input_thread_t * p_input = playlist_CurrentInput( p_playlist ); input_thread_t * p_input = playlist_CurrentInput( p_playlist );
if( [[o_mi title] isEqualToString: _NS("Faster")] || if( [[o_mi title] isEqualToString: _NS("Faster")] ||
[[o_mi title] isEqualToString: _NS("Slower")] ) [[o_mi title] isEqualToString: _NS("Slower")] ||
[[o_mi title] isEqualToString: _NS("Normal rate")] )
{ {
if( p_input != NULL ) if( p_input != NULL )
{ {
......
...@@ -213,6 +213,7 @@ struct intf_sys_t ...@@ -213,6 +213,7 @@ struct intf_sys_t
IBOutlet NSMenuItem * o_mi_stop; IBOutlet NSMenuItem * o_mi_stop;
IBOutlet NSMenuItem * o_mi_faster; IBOutlet NSMenuItem * o_mi_faster;
IBOutlet NSMenuItem * o_mi_slower; IBOutlet NSMenuItem * o_mi_slower;
IBOutlet NSMenuItem * o_mi_normalSpeed;
IBOutlet NSMenuItem * o_mi_previous; IBOutlet NSMenuItem * o_mi_previous;
IBOutlet NSMenuItem * o_mi_next; IBOutlet NSMenuItem * o_mi_next;
IBOutlet NSMenuItem * o_mi_random; IBOutlet NSMenuItem * o_mi_random;
......
...@@ -425,6 +425,9 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -425,6 +425,9 @@ static VLCMain *_o_sharedMainInstance = nil;
i_key = config_GetInt( p_intf, "key-slower" ); i_key = config_GetInt( p_intf, "key-slower" );
[o_mi_slower setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; [o_mi_slower setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_slower setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; [o_mi_slower setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-rate-normal" );
[o_mi_normalSpeed setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_normalSpeed setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-prev" ); i_key = config_GetInt( p_intf, "key-prev" );
[o_mi_previous setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]]; [o_mi_previous setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_previous setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)]; [o_mi_previous setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
...@@ -653,6 +656,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -653,6 +656,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_mi_stop setTitle: _NS("Stop")]; [o_mi_stop setTitle: _NS("Stop")];
[o_mi_faster setTitle: _NS("Faster")]; [o_mi_faster setTitle: _NS("Faster")];
[o_mi_slower setTitle: _NS("Slower")]; [o_mi_slower setTitle: _NS("Slower")];
[o_mi_normalSpeed setTitle: _NS("Normal rate")];
[o_mi_previous setTitle: _NS("Previous")]; [o_mi_previous setTitle: _NS("Previous")];
[o_mi_next setTitle: _NS("Next")]; [o_mi_next setTitle: _NS("Next")];
[o_mi_random setTitle: _NS("Random")]; [o_mi_random setTitle: _NS("Random")];
......
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