diff --git a/modules/gui/macosx/UI/MainMenu.xib b/modules/gui/macosx/UI/MainMenu.xib index 07a48c4e542f11f92ec07352472a2aa89595c39c..c64532935c2b3acb918f3fccc9068a961a460806 100644 --- a/modules/gui/macosx/UI/MainMenu.xib +++ b/modules/gui/macosx/UI/MainMenu.xib @@ -68,7 +68,6 @@ <outlet property="info" destination="1192" id="BPE-5A-AU4"/> <outlet property="jumpToTime" destination="5138" id="XK6-rV-lr9"/> <outlet property="license" destination="2834" id="0tU-nu-6dP"/> - <outlet property="loop" destination="5151" id="scu-xu-Tvh"/> <outlet property="mcopyItem" destination="197" id="aBx-7l-f4e"/> <outlet property="messages" destination="1003" id="q4C-pt-kQo"/> <outlet property="minimize" destination="5606" id="tN3-Ho-T0c"/> @@ -447,17 +446,12 @@ <action selector="random:" target="-2" id="oVh-n6-tgV"/> </connections> </menuItem> - <menuItem title="Repeat Item" keyEquivalent="r" id="5143"> + <menuItem title="Repeat Item" keyEquivalent="L" id="5143"> <connections> <action selector="repeat:" target="-2" id="ThK-0C-9oZ"/> </connections> </menuItem> - <menuItem title="Repeat Playlist" keyEquivalent="l" id="5151"> - <connections> - <action selector="loop:" target="-2" id="Oqv-EO-vhg"/> - </connections> - </menuItem> - <menuItem title="A→B Loop" keyEquivalent="L" id="5409"> + <menuItem title="A→B Loop" keyEquivalent="l" id="5409"> <connections> <action selector="toggleAtoBloop:" target="-2" id="Wrv-He-P33"/> </connections> diff --git a/modules/gui/macosx/menus/VLCMainMenu.h b/modules/gui/macosx/menus/VLCMainMenu.h index 996cc89383268a69f7d7343977732764527a44b4..1517b32cccce6b0db955dfd06118f1192b57c98f 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 1890e78691df5c848ce5cb65fd975ad474cf3397..c90e1e7caad618042e6c260cf55a6dbc08e7a4a1 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];