From e6988dc1da38ad2f1adf6d8fe99d31db0f1bc226 Mon Sep 17 00:00:00 2001 From: Claudio Cambra <claudio.cambra@gmail.com> Date: Sun, 4 Sep 2022 20:02:35 +0200 Subject: [PATCH] macosx: Fix incorrect state of navigation buttons on main library window load Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com> --- modules/gui/macosx/library/VLCLibraryNavigationStack.h | 4 ++-- modules/gui/macosx/library/VLCLibraryNavigationStack.m | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/gui/macosx/library/VLCLibraryNavigationStack.h b/modules/gui/macosx/library/VLCLibraryNavigationStack.h index dbd8d0c18f89..def2e77b082d 100644 --- a/modules/gui/macosx/library/VLCLibraryNavigationStack.h +++ b/modules/gui/macosx/library/VLCLibraryNavigationStack.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN @interface VLCLibraryNavigationStack : NSObject -@property (readwrite, strong) VLCLibraryWindow *delegate; +@property (readwrite, nonatomic) VLCLibraryWindow *delegate; @property (readonly) BOOL forwardsAvailable; @property (readonly) BOOL backwardsAvailable; @@ -39,4 +39,4 @@ NS_ASSUME_NONNULL_BEGIN @end -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/modules/gui/macosx/library/VLCLibraryNavigationStack.m b/modules/gui/macosx/library/VLCLibraryNavigationStack.m index 477adbf54c53..8cfab5e62058 100644 --- a/modules/gui/macosx/library/VLCLibraryNavigationStack.m +++ b/modules/gui/macosx/library/VLCLibraryNavigationStack.m @@ -72,6 +72,12 @@ return self; } +- (void)setDelegate:(VLCLibraryWindow *)delegate +{ + _delegate = delegate; + [self updateDelegateNavigationButtons]; +} + - (BOOL)forwardsAvailable { NSUInteger numNavigationStates = _navigationStates.count; @@ -157,4 +163,4 @@ [self updateDelegateNavigationButtons]; } -@end \ No newline at end of file +@end -- GitLab