Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
ed30c126 by Claudio Cambra at 2024-04-22T07:08:38+00:00
macosx: Do not set nil input item as represented input item for information 
window

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -
95522489 by Claudio Cambra at 2024-04-22T07:08:38+00:00
macosx: Fix information window not being shown at all when currently playing 
input item is nil, but without crashing

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -
58ec5cfd by Claudio Cambra at 2024-04-22T07:08:38+00:00
macosx: Disable information window menu entry if current input item is nil

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -
b0162f06 by Claudio Cambra at 2024-04-22T07:08:38+00:00
macosx: Add parentheses to representedItem in informationwindowcontroller

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -
a4afdce0 by Claudio Cambra at 2024-04-22T07:08:38+00:00
macosx: Directly disable autoenabling items in windowmenu

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -


2 changed files:

- modules/gui/macosx/menus/VLCMainMenu.m
- modules/gui/macosx/panels/VLCInformationWindowController.m


Changes:

=====================================
modules/gui/macosx/menus/VLCMainMenu.m
=====================================
@@ -630,21 +630,23 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
 {
     [self updateTrackHandlingMenus:aNotification];
 
-    VLCInputItem *inputItem = _playerController.currentMedia;
+    VLCInputItem * const inputItem = _playerController.currentMedia;
 
-    if (inputItem != NULL) {
+    if (inputItem != nil) {
         [self rebuildAoutMenu];
         [self rebuildVoutMenu];
-        inputItem = nil;
-
         [self setRateControlsEnabled:_playerController.rateChangable];
         [self setSubtitleSizeControlsEnabled:YES];
+        self.info.enabled = YES;
     } else {
         [_postprocessing setEnabled:NO];
         [self setAudioSubMenusEnabled:NO];
         [self setVideoMenuActiveVideo:NO];
         [self setRateControlsEnabled:NO];
         [self setSubtitleSizeControlsEnabled:NO];
+
+        self.windowMenu.autoenablesItems = NO;
+        self.info.enabled = NO;
     }
 }
 
@@ -1535,6 +1537,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
         _infoWindowController = [[VLCInformationWindowController alloc] init];
         _infoWindowController.mainMenuInstance = YES;
     }
+
     _infoWindowController.representedInputItem = 
_playlistController.currentlyPlayingInputItem;
     [_infoWindowController toggleWindow:sender];
 }


=====================================
modules/gui/macosx/panels/VLCInformationWindowController.m
=====================================
@@ -264,7 +264,7 @@ _##field##TextField.delegate = self
 
 - (void)setRepresentedInputItem:(VLCInputItem *)representedInputItem
 {
-    _representedInputItems = @[representedInputItem];
+    _representedInputItems = (representedInputItem == nil) ? @[] : 
@[representedInputItem];
     _artwork = [VLCLibraryImageCache 
thumbnailForInputItem:representedInputItem];
     [self updateRepresentation];
 }



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/c9afd0cfa3cbb7dca9cbdcbfdb11784e5867dd79...a4afdce02a1ba3c858e1e15033e41fcd85e3052c

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/c9afd0cfa3cbb7dca9cbdcbfdb11784e5867dd79...a4afdce02a1ba3c858e1e15033e41fcd85e3052c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to