Browse Source

macosx: Fix bugs with library window restoration and setting of navigation stack state

Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
pull/138/head
Claudio Cambra 4 years ago
committed by Felix Paul Kühne
parent
commit
2f4ba073a3
  1. 2
      modules/gui/macosx/library/VLCLibraryAudioDataSource.m
  2. 2
      modules/gui/macosx/library/VLCLibraryNavigationState.m
  3. 6
      modules/gui/macosx/library/VLCLibraryWindow.m

2
modules/gui/macosx/library/VLCLibraryAudioDataSource.m

@ -200,7 +200,7 @@
{
[self.segmentedControl setTarget:self];
[self.segmentedControl setAction:@selector(segmentedControlAction:)];
[self segmentedControlAction:self];
[self segmentedControlAction:[[[VLCMain sharedInstance] libraryWindow] navigationStack]];
}
- (void)reloadEmptyViewAppearance

2
modules/gui/macosx/library/VLCLibraryNavigationState.m

@ -39,4 +39,4 @@
return navState;
}
@end
@end

6
modules/gui/macosx/library/VLCLibraryWindow.m

@ -995,8 +995,12 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[libraryWindow.gridVsListSegmentedControl setSelectedSegment:rememberedSelectedLibraryViewModeSegment];
[libraryWindow.libraryAudioDataSource.segmentedControl setSelectedSegment:rememberedSelectedLibraryViewAudioSegment];
[libraryWindow segmentedControlAction:libraryWindow.navigationStack]; // Prevent actions being added to the nav stack
// We don't want to add these to the navigation stack...
[libraryWindow.libraryAudioDataSource segmentedControlAction:libraryWindow.navigationStack];
[libraryWindow segmentedControlAction:libraryWindow.navigationStack];
// But we do want the "final" initial position to be added. So we manually invoke the navigation stack
[libraryWindow.navigationStack appendCurrentLibraryState];
completionHandler(libraryWindow, nil);
}

Loading…
Cancel
Save