[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Rather than enable video submenus directly, configure the video menu...
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Thu May 11 07:59:03 UTC 2023
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
6429e720 by Claudio Cambra at 2023-05-11T07:41:14+00:00
macosx: Rather than enable video submenus directly, configure the video menu first and configure video submenu from there
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
84aed97a by Claudio Cambra at 2023-05-11T07:41:14+00:00
macosx: Toggle snapshot video menu entry depending on current playback state
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/menus/VLCMainMenu.m
Changes:
=====================================
modules/gui/macosx/menus/VLCMainMenu.m
=====================================
@@ -641,7 +641,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
} else {
[_postprocessing setEnabled:NO];
[self setAudioSubMenusEnabled:NO];
- [self setVideoSubmenusEnabled:NO];
+ [self setVideoMenuActiveVideo:NO];
[self setRateControlsEnabled:NO];
[self setSubtitleSizeControlsEnabled:NO];
}
@@ -710,8 +710,8 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
[self refreshVoutDeviceMenu:nil];
- BOOL activeVideoPlayback = _playerController.activeVideoPlayback;
- [self setVideoSubmenusEnabled:activeVideoPlayback];
+ const BOOL activeVideoPlayback = _playerController.activeVideoPlayback;
+ [self setVideoMenuActiveVideo:activeVideoPlayback];
}
- (void)refreshVoutDeviceMenu:(NSNotification *)notification
@@ -748,6 +748,16 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
[_channels setEnabled: enabled];
}
+- (void)setVideoMenuActiveVideo:(BOOL)activeVideo
+{
+ if (_videoMenu.autoenablesItems) {
+ _videoMenu.autoenablesItems = NO;
+ }
+
+ _snapshot.enabled = activeVideo;
+ [self setVideoSubmenusEnabled:activeVideo];
+}
+
- (void)setVideoSubmenusEnabled:(BOOL)enabled
{
[_deinterlace setEnabled: enabled];
@@ -1522,7 +1532,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
break;
case VLC_PLAYER_STATE_STOPPED:
- [self setVideoSubmenusEnabled:NO];
+ [self setVideoMenuActiveVideo:NO];
[self setAudioSubMenusEnabled:NO];
default:
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/43907dd96ead9e6e1427856e2eeff05897b5b2dd...84aed97a7651e0b483ee5e2f0c81e8d6ae39d7a9
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/43907dd96ead9e6e1427856e2eeff05897b5b2dd...84aed97a7651e0b483ee5e2f0c81e8d6ae39d7a9
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list