mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-18 23:45:06 +02:00
macosx: add key equivalents to vout menu matching the main menu
This commit is contained in:
parent
33ee620840
commit
df0ecabdfb
@ -87,6 +87,10 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
||||
|
||||
@end
|
||||
|
||||
@interface NSMenuItem (KeyEquivalentAddition)
|
||||
- (void)matchKeyEquivalentsOfMenuItem:(NSMenuItem *)menuItem;
|
||||
@end
|
||||
|
||||
@interface VLCMainMenu() <NSMenuDelegate>
|
||||
{
|
||||
VLCAboutWindowController *_aboutWindowController;
|
||||
@ -296,6 +300,17 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
||||
[menuItem setTag:scaleValues[i].scaleValue];
|
||||
[menuItem setTarget: self];
|
||||
}
|
||||
|
||||
[_voutMenuplay matchKeyEquivalentsOfMenuItem:_play];
|
||||
[_voutMenustop matchKeyEquivalentsOfMenuItem:_stop];
|
||||
[_voutMenunext matchKeyEquivalentsOfMenuItem:_next];
|
||||
[_voutMenuprev matchKeyEquivalentsOfMenuItem:_previous];
|
||||
[_voutMenuRecord matchKeyEquivalentsOfMenuItem:_record];
|
||||
[_voutMenuvolup matchKeyEquivalentsOfMenuItem:_vol_up];
|
||||
[_voutMenuvoldown matchKeyEquivalentsOfMenuItem:_vol_down];
|
||||
[_voutMenumute matchKeyEquivalentsOfMenuItem:_mute];
|
||||
[_voutMenufullscreen matchKeyEquivalentsOfMenuItem:_fullscreenItem];
|
||||
[_voutMenusnapshot matchKeyEquivalentsOfMenuItem:_snapshot];
|
||||
}
|
||||
|
||||
- (void)setupMenu:(NSMenu *)menu withIntList:(char *)psz_name andSelector:(SEL)selector
|
||||
@ -1931,3 +1946,13 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMenuItem (KeyEquivalentAddition)
|
||||
|
||||
- (void)matchKeyEquivalentsOfMenuItem:(NSMenuItem *)menuItem
|
||||
{
|
||||
self.keyEquivalent = menuItem.keyEquivalent;
|
||||
self.keyEquivalentModifierMask = menuItem.keyEquivalentModifierMask;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user