diff --git a/modules/gui/macosx/UI/MainMenu.xib b/modules/gui/macosx/UI/MainMenu.xib index 07a48c4e54..c64532935c 100644 --- a/modules/gui/macosx/UI/MainMenu.xib +++ b/modules/gui/macosx/UI/MainMenu.xib @@ -68,7 +68,6 @@ - @@ -447,17 +446,12 @@ - + - - - - - - + diff --git a/modules/gui/macosx/menus/VLCMainMenu.h b/modules/gui/macosx/menus/VLCMainMenu.h index 996cc89383..1517b32ccc 100644 --- a/modules/gui/macosx/menus/VLCMainMenu.h +++ b/modules/gui/macosx/menus/VLCMainMenu.h @@ -86,7 +86,6 @@ @property (readwrite, weak) IBOutlet NSMenuItem *next; @property (readwrite, weak) IBOutlet NSMenuItem *random; @property (readwrite, weak) IBOutlet NSMenuItem *repeat; -@property (readwrite, weak) IBOutlet NSMenuItem *loop; @property (readwrite, weak) IBOutlet NSMenuItem *AtoBloop; @property (readwrite, weak) IBOutlet NSMenuItem *sortPlaylist; @property (readwrite, weak) IBOutlet NSMenuItem *quitAfterPB; @@ -240,7 +239,6 @@ - (IBAction)next:(id)sender; - (IBAction)random:(id)sender; - (IBAction)repeat:(id)sender; -- (IBAction)loop:(id)sender; - (IBAction)forward:(id)sender; - (IBAction)backward:(id)sender; diff --git a/modules/gui/macosx/menus/VLCMainMenu.m b/modules/gui/macosx/menus/VLCMainMenu.m index 1890e78691..c90e1e7caa 100644 --- a/modules/gui/macosx/menus/VLCMainMenu.m +++ b/modules/gui/macosx/menus/VLCMainMenu.m @@ -385,8 +385,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) { [_previous setTitle: _NS("Previous")]; [_next setTitle: _NS("Next")]; [_random setTitle: _NS("Random")]; - [_repeat setTitle: _NS("Repeat One")]; - [_loop setTitle: _NS("Repeat All")]; + [_repeat setTitle: _NS("Repeat")]; [_AtoBloop setTitle: _NS("A→B Loop")]; [_sortPlaylist setTitle: _NS("Sort Playlist")]; [_quitAfterPB setTitle: _NS("Quit after Playback")]; @@ -580,6 +579,11 @@ typedef NS_ENUM(NSInteger, VLCObjectType) { [_random setKeyEquivalentModifierMask: VLCModifiersToCocoa(key)]; FREENULL(key); + key = config_GetPsz("key-loop"); + [_repeat setKeyEquivalent: VLCKeyToString(key)]; + [_repeat setKeyEquivalentModifierMask: VLCModifiersToCocoa(key)]; + FREENULL(key); + key = config_GetPsz("key-zoom-half"); [_half_window setKeyEquivalent: VLCKeyToString(key)]; [_half_window setKeyEquivalentModifierMask: VLCModifiersToCocoa(key)]; @@ -798,21 +802,14 @@ typedef NS_ENUM(NSInteger, VLCObjectType) { - (IBAction)repeat:(id)sender { if (_playlistController.playbackRepeat == VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT) { + _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_ALL; + } else if (_playlistController.playbackRepeat == VLC_PLAYLIST_PLAYBACK_REPEAT_ALL) { _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_NONE; } else { _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT; } } -- (IBAction)loop:(id)sender -{ - if (_playlistController.playbackRepeat == VLC_PLAYLIST_PLAYBACK_REPEAT_ALL) { - _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_NONE; - } else { - _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_ALL; - } -} - - (IBAction)forward:(id)sender { [_playerController jumpForwardShort]; @@ -1531,19 +1528,19 @@ typedef NS_ENUM(NSInteger, VLCObjectType) { - (void)setRepeatOne { [_repeat setState: NSOnState]; - [_loop setState: NSOffState]; + [_repeat setTitle: _NS("Repeat One")]; } - (void)setRepeatAll { - [_repeat setState: NSOffState]; - [_loop setState: NSOnState]; + [_repeat setState: NSOnState]; + [_repeat setTitle: _NS("Repeat All")]; } - (void)setRepeatOff { [_repeat setState: NSOffState]; - [_loop setState: NSOffState]; + [_repeat setTitle: _NS("Repeat")]; } #pragma mark - Dynamic menu creation and validation @@ -1823,12 +1820,6 @@ typedef NS_ENUM(NSInteger, VLCObjectType) { } else if (mi == _random) { enum vlc_playlist_playback_order playbackOrder = [_playlistController playbackOrder]; [mi setState: playbackOrder == VLC_PLAYLIST_PLAYBACK_ORDER_RANDOM ? NSOnState : NSOffState]; - } else if (mi == _repeat) { - enum vlc_playlist_playback_repeat playbackRepeat = [_playlistController playbackRepeat]; - [mi setState: playbackRepeat == VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT ? NSOnState : NSOffState]; - } else if (mi == _loop) { - enum vlc_playlist_playback_repeat playbackRepeat = [_playlistController playbackRepeat]; - [mi setState: playbackRepeat == VLC_PLAYLIST_PLAYBACK_REPEAT_ALL ? NSOnState : NSOffState]; } else if (mi == _quitAfterPB) { BOOL state = _playerController.actionAfterStop == VLC_PLAYER_MEDIA_STOPPED_EXIT; [mi setState: state ? NSOnState : NSOffState];