[vlc-commits] macosx/sprefs: hide media library setting if it's disabled
Felix Paul Kühne
git at videolan.org
Mon Jul 15 13:58:30 CEST 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Sun Jul 14 17:41:35 2019 +0200| [d2349999e52b85d1a8d62b46a742eaf29a01b3c8] | committer: Felix Paul Kühne
macosx/sprefs: hide media library setting if it's disabled
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d2349999e52b85d1a8d62b46a742eaf29a01b3c8
---
.../macosx/preferences/VLCSimplePrefsController.m | 26 +++++++++++++++-------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.m b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
index 6668940a59..482a886325 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
@@ -303,14 +303,24 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
static NSArray<NSString *> *toolbarIdentifiers = nil;
dispatch_once(&onceToken, ^{
- toolbarIdentifiers = @[VLCIntfSettingToolbarIdentifier,
- VLCAudioSettingToolbarIdentifier,
- VLCVideoSettingToolbarIdentifier,
- VLCOSDSettingToolbarIdentifier,
- VLCInputSettingToolbarIdentifier,
- VLCMediaLibrarySettingToolbarIdentifier,
- VLCHotkeysSettingToolbarIdentifier,
- NSToolbarFlexibleSpaceItemIdentifier];
+ if ([[[VLCMain sharedInstance] libraryController] libraryModel]) {
+ toolbarIdentifiers = @[VLCIntfSettingToolbarIdentifier,
+ VLCAudioSettingToolbarIdentifier,
+ VLCVideoSettingToolbarIdentifier,
+ VLCOSDSettingToolbarIdentifier,
+ VLCInputSettingToolbarIdentifier,
+ VLCMediaLibrarySettingToolbarIdentifier,
+ VLCHotkeysSettingToolbarIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier];
+ } else {
+ toolbarIdentifiers = @[VLCIntfSettingToolbarIdentifier,
+ VLCAudioSettingToolbarIdentifier,
+ VLCVideoSettingToolbarIdentifier,
+ VLCOSDSettingToolbarIdentifier,
+ VLCInputSettingToolbarIdentifier,
+ VLCHotkeysSettingToolbarIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier];
+ }
});
return toolbarIdentifiers;
More information about the vlc-commits
mailing list