[vlc-commits] macosx: merge library folder management window to simple preferences

Felix Paul Kühne git at videolan.org
Thu May 30 21:12:37 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Thu May 30 21:04:59 2019 +0200| [9ee4545085776b2505361887a21eed9abb94eb93] | committer: Felix Paul Kühne

macosx: merge library folder management window to simple preferences

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ee4545085776b2505361887a21eed9abb94eb93
---

 .../package/macosx/VLC.xcodeproj/project.pbxproj   |   8 -
 modules/gui/macosx/Makefile.am                     |   3 -
 modules/gui/macosx/UI/MainMenu.xib                 |   7 -
 modules/gui/macosx/UI/SimplePreferences.xib        | 140 +++++++++++++-
 .../macosx/UI/VLCLibraryFolderManagementWindow.xib | 168 -----------------
 .../library/VLCLibraryFolderManagementWindow.h     |  48 -----
 .../library/VLCLibraryFolderManagementWindow.m     | 157 ----------------
 modules/gui/macosx/menus/VLCMainMenu.h             |   3 -
 modules/gui/macosx/menus/VLCMainMenu.m             |  11 --
 .../macosx/preferences/VLCSimplePrefsController.h  |  52 ++++--
 .../macosx/preferences/VLCSimplePrefsController.m  | 206 ++++++++++++++++++---
 po/POTFILES.in                                     |   2 -
 12 files changed, 352 insertions(+), 453 deletions(-)

diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index a1fadb9f6c..5701bc5974 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -132,7 +132,6 @@
 		7D903EAF224392B400917358 /* timespec_get.c in Sources */ = {isa = PBXBuildFile; fileRef = 7D903EAE224392B400917358 /* timespec_get.c */; };
 		7D903EB6224394BE00917358 /* specific.c in Sources */ = {isa = PBXBuildFile; fileRef = 7D903EB5224394BE00917358 /* specific.c */; };
 		7D903EB92243952100917358 /* threads.c in Sources */ = {isa = PBXBuildFile; fileRef = 7D903EB82243952100917358 /* threads.c */; };
-		7D94E28D2274D2140008057F /* VLCLibraryFolderManagementWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D94E28B2274D2140008057F /* VLCLibraryFolderManagementWindow.m */; };
 		7DB40D2A20CBCEB500F63173 /* VLCMainMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB40D2920CBCEB500F63173 /* VLCMainMenu.m */; };
 		7DB40D2D20CBCEC200F63173 /* VLCStatusBarIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB40D2B20CBCEC200F63173 /* VLCStatusBarIcon.m */; };
 		7DB7F1EC20CC036D00C2CAED /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DB7F1EB20CC036D00C2CAED /* AudioUnit.framework */; };
@@ -512,9 +511,6 @@
 		7D903EAE224392B400917358 /* timespec_get.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = timespec_get.c; path = ../../../../compat/timespec_get.c; sourceTree = "<group>"; };
 		7D903EB5224394BE00917358 /* specific.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = specific.c; path = ../../../src/darwin/specific.c; sourceTree = "<group>"; };
 		7D903EB82243952100917358 /* threads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = threads.c; path = ../../../../src/misc/threads.c; sourceTree = "<group>"; };
-		7D94E28A2274D2140008057F /* VLCLibraryFolderManagementWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryFolderManagementWindow.h; sourceTree = "<group>"; };
-		7D94E28B2274D2140008057F /* VLCLibraryFolderManagementWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryFolderManagementWindow.m; sourceTree = "<group>"; };
-		7D94E28C2274D2140008057F /* VLCLibraryFolderManagementWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryFolderManagementWindow.xib; sourceTree = "<group>"; };
 		7DB40D2820CBCEB500F63173 /* VLCMainMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainMenu.h; sourceTree = "<group>"; };
 		7DB40D2920CBCEB500F63173 /* VLCMainMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainMenu.m; sourceTree = "<group>"; };
 		7DB40D2B20CBCEC200F63173 /* VLCStatusBarIcon.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCStatusBarIcon.m; sourceTree = "<group>"; };
@@ -1027,8 +1023,6 @@
 				7DE2F0432282C84A0040DD0A /* VLCLibraryAudioDataSource.m */,
 				7DFBDCAF226A518400B700A5 /* VLCLibraryMenuController.h */,
 				7DFBDCB0226A518400B700A5 /* VLCLibraryMenuController.m */,
-				7D94E28A2274D2140008057F /* VLCLibraryFolderManagementWindow.h */,
-				7D94E28B2274D2140008057F /* VLCLibraryFolderManagementWindow.m */,
 				7DFBDCBF226DC16200B700A5 /* VLCInputItem.h */,
 				7DFBDCC0226DC16200B700A5 /* VLCInputItem.m */,
 			);
@@ -1518,7 +1512,6 @@
 			children = (
 				6B8224091E4D2A9000833BE1 /* MainMenu.xib */,
 				7D713D332201BB130042BEB7 /* VLCLibraryWindow.xib */,
-				7D94E28C2274D2140008057F /* VLCLibraryFolderManagementWindow.xib */,
 				7D0F64002201F66D00FDB91F /* VLCPlaylistTableCellView.xib */,
 				7D445D8F220339D400263D34 /* VLCPlaylistMenu.xib */,
 				7D0F64052202047900FDB91F /* VLCLibraryCollectionViewItem.xib */,
@@ -1662,7 +1655,6 @@
 				1CCC89012078A3D500E5626F /* Preferences.xib in Sources */,
 				7DC21A7422049A6600F98A02 /* VLCOpenInputMetadata.m in Sources */,
 				1CCC89022078A3D500E5626F /* ResumeDialog.xib in Sources */,
-				7D94E28D2274D2140008057F /* VLCLibraryFolderManagementWindow.m in Sources */,
 				1CCC89032078A3D500E5626F /* SimplePreferences.xib in Sources */,
 				7DE82E7922843781002D341A /* VLCLibraryAlbumTableCellView.m in Sources */,
 				1CCC89042078A3D500E5626F /* StreamOutput.xib in Sources */,
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index d9f2aa1c58..49e8e04a19 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -66,8 +66,6 @@ libmacosx_plugin_la_SOURCES = \
 	gui/macosx/library/VLCLibraryController.m \
 	gui/macosx/library/VLCLibraryDataTypes.h \
 	gui/macosx/library/VLCLibraryDataTypes.m \
-	gui/macosx/library/VLCLibraryFolderManagementWindow.h \
-	gui/macosx/library/VLCLibraryFolderManagementWindow.m \
 	gui/macosx/library/VLCLibraryMenuController.h \
 	gui/macosx/library/VLCLibraryMenuController.m \
 	gui/macosx/library/VLCLibraryModel.h \
@@ -265,7 +263,6 @@ libmacosx_plugin_la_XIB_SOURCES = \
 	gui/macosx/UI/MainMenu.xib \
 	gui/macosx/UI/VLCLibraryAlbumTableCellView.xib \
 	gui/macosx/UI/VLCLibraryWindow.xib \
-	gui/macosx/UI/VLCLibraryFolderManagementWindow.xib \
 	gui/macosx/UI/VLCLibraryTableCellView.xib \
 	gui/macosx/UI/VLCPlaylistMenu.xib \
 	gui/macosx/UI/VLCPlaylistTableCellView.xib \
diff --git a/modules/gui/macosx/UI/MainMenu.xib b/modules/gui/macosx/UI/MainMenu.xib
index e543134225..0b1a8cd1f8 100644
--- a/modules/gui/macosx/UI/MainMenu.xib
+++ b/modules/gui/macosx/UI/MainMenu.xib
@@ -116,7 +116,6 @@
                 <outlet property="screenMenu" destination="1015" id="l5t-0E-DfG"/>
                 <outlet property="select_all" destination="198" id="Is0-ct-CbR"/>
                 <outlet property="services" destination="1996" id="X3H-XI-xFK"/>
-                <outlet property="showLibraryFolders" destination="5413" id="Yfe-WM-WVa"/>
                 <outlet property="show_all" destination="150" id="XQ2-CW-0PI"/>
                 <outlet property="snapshot" destination="2249" id="6bO-HY-I3I"/>
                 <outlet property="stop" destination="5156" id="irh-Cr-vBT"/>
@@ -366,12 +365,6 @@
                     <modifierMask key="keyEquivalentModifierMask"/>
                     <menu key="submenu" title="View" id="5238">
                         <items>
-                            <menuItem title="Show Library Folders..." id="5413">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="showLibraryFolders:" target="-2" id="7L9-pf-bP7"/>
-                                </connections>
-                            </menuItem>
                             <menuItem isSeparatorItem="YES" id="5250"/>
                             <menuItem title="Playlist Table Columns" id="5247">
                                 <modifierMask key="keyEquivalentModifierMask"/>
diff --git a/modules/gui/macosx/UI/SimplePreferences.xib b/modules/gui/macosx/UI/SimplePreferences.xib
index 1366b78cc7..37608c6262 100644
--- a/modules/gui/macosx/UI/SimplePreferences.xib
+++ b/modules/gui/macosx/UI/SimplePreferences.xib
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14313.13.2" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.13.2"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -81,6 +81,15 @@
                 <outlet property="intf_playbackControlBox" destination="CZP-ZN-k6p" id="voN-Ji-9aw"/>
                 <outlet property="intf_statusIconCheckbox" destination="r3P-eU-tEX" id="ixl-Al-ddh"/>
                 <outlet property="intf_updateCheckbox" destination="3556" id="YsJ-GG-xVt"/>
+                <outlet property="mediaLibraryAddFolderButton" destination="AsR-G7-aHo" id="rWZ-Ns-RgB"/>
+                <outlet property="mediaLibraryBanFolderButton" destination="Yvu-g1-fLU" id="FIb-RT-Ymv"/>
+                <outlet property="mediaLibraryBannedTableColumn" destination="bjG-Ru-jiX" id="4KB-Y9-maP"/>
+                <outlet property="mediaLibraryFolderTableView" destination="uR2-Au-IEe" id="5kB-Wd-fSH"/>
+                <outlet property="mediaLibraryNameTableColumn" destination="wAS-Qh-rAS" id="2ei-jH-cvI"/>
+                <outlet property="mediaLibraryPathTableColumn" destination="QBg-HT-Vvb" id="4AQ-jb-HLf"/>
+                <outlet property="mediaLibraryPresentTableColumn" destination="kVl-Wj-9vm" id="cmW-Jn-uIQ"/>
+                <outlet property="mediaLibraryRemoveFolderButton" destination="WnC-lv-27l" id="EUb-bH-L13"/>
+                <outlet property="mediaLibraryView" destination="eei-wi-f9H" id="Oh4-jV-mOk"/>
                 <outlet property="osdView" destination="2523" id="d1o-FZ-hXa"/>
                 <outlet property="osd_encodingLabel" destination="2531" id="yyW-qD-zJ0"/>
                 <outlet property="osd_encodingPopup" destination="2532" id="mBO-m6-lIV"/>
@@ -1887,7 +1896,7 @@ Gw
                     <rect key="frame" x="20" y="60" width="530" height="311"/>
                     <clipView key="contentView" id="EbT-aN-Pgg">
                         <rect key="frame" x="1" y="0.0" width="528" height="310"/>
-                        <autoresizingMask key="autoresizingMask"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveName="sprefs_hotkeys_view" headerView="3541" id="2670">
                                 <rect key="frame" x="0.0" y="0.0" width="528" height="287"/>
@@ -2354,5 +2363,130 @@ Gw
                 </constraints>
             </view>
         </window>
+        <customView translatesAutoresizingMaskIntoConstraints="NO" id="eei-wi-f9H" userLabel="Library">
+            <rect key="frame" x="0.0" y="0.0" width="570" height="426"/>
+            <subviews>
+                <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gbE-0a-hRm">
+                    <rect key="frame" x="20" y="55" width="530" height="311"/>
+                    <clipView key="contentView" ambiguous="YES" id="2Qm-UL-Q5r">
+                        <rect key="frame" x="1" y="0.0" width="528" height="310"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="ZJl-qT-3EL" id="uR2-Au-IEe">
+                                <rect key="frame" x="0.0" y="0.0" width="528" height="285"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <size key="intercellSpacing" width="3" height="2"/>
+                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                <tableColumns>
+                                    <tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="wAS-Qh-rAS">
+                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                            <font key="font" metaFont="smallSystem"/>
+                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                        </tableHeaderCell>
+                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="HF2-k9-u2L">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                    </tableColumn>
+                                    <tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="kVl-Wj-9vm">
+                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                            <font key="font" metaFont="smallSystem"/>
+                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                        </tableHeaderCell>
+                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="BzP-8N-ePz">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                    </tableColumn>
+                                    <tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="bjG-Ru-jiX">
+                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                            <font key="font" metaFont="smallSystem"/>
+                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                        </tableHeaderCell>
+                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="Tvq-Lx-Bg9">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                    </tableColumn>
+                                    <tableColumn editable="NO" width="168" minWidth="40" maxWidth="1000" id="QBg-HT-Vvb">
+                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                            <font key="font" metaFont="smallSystem"/>
+                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                        </tableHeaderCell>
+                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="w2t-R8-nAs" customClass="NSPathComponentCell">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                    </tableColumn>
+                                </tableColumns>
+                            </tableView>
+                        </subviews>
+                    </clipView>
+                    <constraints>
+                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="311" id="g8D-ve-asl"/>
+                    </constraints>
+                    <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="T9s-hf-wxH">
+                        <rect key="frame" x="1" y="273" width="528" height="16"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                    <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Qb5-gH-ISt">
+                        <rect key="frame" x="224" y="17" width="15" height="102"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                    <tableHeaderView key="headerView" id="ZJl-qT-3EL">
+                        <rect key="frame" x="0.0" y="0.0" width="528" height="25"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </tableHeaderView>
+                </scrollView>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AsR-G7-aHo">
+                    <rect key="frame" x="14" y="13" width="117" height="32"/>
+                    <buttonCell key="cell" type="push" title="Add Folder..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="TE0-DV-iku">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WnC-lv-27l">
+                    <rect key="frame" x="131" y="13" width="131" height="32"/>
+                    <buttonCell key="cell" type="push" title="Remove Folder" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5lO-dg-v02">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yvu-g1-fLU">
+                    <rect key="frame" x="262" y="13" width="64" height="32"/>
+                    <buttonCell key="cell" type="push" title="Ban" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ga6-ZJ-oef">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+            </subviews>
+            <constraints>
+                <constraint firstItem="AsR-G7-aHo" firstAttribute="leading" secondItem="eei-wi-f9H" secondAttribute="leading" constant="20" id="3jm-3z-Xs7"/>
+                <constraint firstItem="AsR-G7-aHo" firstAttribute="centerY" secondItem="WnC-lv-27l" secondAttribute="centerY" id="Aj1-lf-d90"/>
+                <constraint firstItem="WnC-lv-27l" firstAttribute="centerY" secondItem="Yvu-g1-fLU" secondAttribute="centerY" id="Rsb-k3-Qtk"/>
+                <constraint firstItem="gbE-0a-hRm" firstAttribute="top" secondItem="eei-wi-f9H" secondAttribute="top" constant="60" id="VDk-uE-IWD"/>
+                <constraint firstItem="Yvu-g1-fLU" firstAttribute="leading" secondItem="WnC-lv-27l" secondAttribute="trailing" constant="12" id="YM9-u7-u7m"/>
+                <constraint firstItem="AsR-G7-aHo" firstAttribute="top" secondItem="uR2-Au-IEe" secondAttribute="bottom" constant="10" id="elE-dp-8C5"/>
+                <constraint firstItem="gbE-0a-hRm" firstAttribute="leading" secondItem="eei-wi-f9H" secondAttribute="leading" constant="20" id="ggB-z1-D2B"/>
+                <constraint firstAttribute="bottom" secondItem="AsR-G7-aHo" secondAttribute="bottom" constant="20" id="hxw-eg-Qfw"/>
+                <constraint firstAttribute="trailing" secondItem="gbE-0a-hRm" secondAttribute="trailing" constant="20" id="n4Z-j5-Mtr"/>
+                <constraint firstItem="WnC-lv-27l" firstAttribute="leading" secondItem="AsR-G7-aHo" secondAttribute="trailing" constant="12" id="nX8-gx-X3w"/>
+                <constraint firstItem="AsR-G7-aHo" firstAttribute="top" secondItem="gbE-0a-hRm" secondAttribute="bottom" constant="14" id="tvU-aS-f8N"/>
+            </constraints>
+            <point key="canvasLocation" x="139" y="1098"/>
+        </customView>
     </objects>
 </document>
diff --git a/modules/gui/macosx/UI/VLCLibraryFolderManagementWindow.xib b/modules/gui/macosx/UI/VLCLibraryFolderManagementWindow.xib
deleted file mode 100644
index aea4d05f9a..0000000000
--- a/modules/gui/macosx/UI/VLCLibraryFolderManagementWindow.xib
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="VLCLibraryFolderManagementWindow">
-            <connections>
-                <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5" customClass="VLCLibraryFolderManagementWindow">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="638" height="375"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="638" height="375"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cN4-CV-0ZY">
-                        <rect key="frame" x="0.0" y="40" width="638" height="335"/>
-                        <clipView key="contentView" id="iBY-dM-gpy">
-                            <rect key="frame" x="1" y="0.0" width="636" height="319"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            <subviews>
-                                <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="qUX-xV-r50" id="yXW-Oh-c8y">
-                                    <rect key="frame" x="0.0" y="0.0" width="874" height="294"/>
-                                    <autoresizingMask key="autoresizingMask"/>
-                                    <size key="intercellSpacing" width="3" height="2"/>
-                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
-                                    <tableColumns>
-                                        <tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="yeU-u1-CWG">
-                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                            </tableHeaderCell>
-                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="i4B-9b-CSN">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        </tableColumn>
-                                        <tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="Bs6-l7-T2R">
-                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                            </tableHeaderCell>
-                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="s5u-MH-82l">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        </tableColumn>
-                                        <tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="MyB-sf-7Zj">
-                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                            </tableHeaderCell>
-                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="BTa-z6-tCC">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        </tableColumn>
-                                        <tableColumn editable="NO" width="514" minWidth="40" maxWidth="1000" id="oY3-Hl-Pyi">
-                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                            </tableHeaderCell>
-                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" id="rue-hK-UWM" customClass="NSPathComponentCell">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        </tableColumn>
-                                    </tableColumns>
-                                    <connections>
-                                        <outlet property="dataSource" destination="F0z-JX-Cv5" id="8f8-Oz-6wF"/>
-                                        <outlet property="delegate" destination="F0z-JX-Cv5" id="p5g-fz-zBe"/>
-                                    </connections>
-                                </tableView>
-                            </subviews>
-                        </clipView>
-                        <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="AbQ-Qa-KFB">
-                            <rect key="frame" x="1" y="319" width="636" height="15"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </scroller>
-                        <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="wbF-0g-t3S">
-                            <rect key="frame" x="224" y="17" width="15" height="102"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </scroller>
-                        <tableHeaderView key="headerView" id="qUX-xV-r50">
-                            <rect key="frame" x="0.0" y="0.0" width="874" height="25"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </tableHeaderView>
-                    </scrollView>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="M6Q-FK-KFM">
-                        <rect key="frame" x="4" y="3" width="117" height="32"/>
-                        <buttonCell key="cell" type="push" title="Add Folder..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="dz7-Ho-opb">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="addFolder:" target="F0z-JX-Cv5" id="ESX-mj-rsH"/>
-                        </connections>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TXg-4i-ifD">
-                        <rect key="frame" x="121" y="3" width="131" height="32"/>
-                        <buttonCell key="cell" type="push" title="Remove Folder" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ntF-De-N3a">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="removeFolder:" target="F0z-JX-Cv5" id="0va-hY-kub"/>
-                        </connections>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7YE-Q5-Ga6">
-                        <rect key="frame" x="252" y="3" width="64" height="32"/>
-                        <buttonCell key="cell" type="push" title="Ban" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="aeQ-5m-txD">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="banFolder:" target="F0z-JX-Cv5" id="hwx-lv-G4o"/>
-                        </connections>
-                    </button>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="TXg-4i-ifD" firstAttribute="leading" secondItem="M6Q-FK-KFM" secondAttribute="trailing" constant="12" id="3Aa-O9-FDM"/>
-                    <constraint firstAttribute="trailing" secondItem="cN4-CV-0ZY" secondAttribute="trailing" id="9fQ-kS-fVl"/>
-                    <constraint firstAttribute="bottom" secondItem="cN4-CV-0ZY" secondAttribute="bottom" constant="40" id="JcK-pt-MPl"/>
-                    <constraint firstAttribute="bottom" secondItem="M6Q-FK-KFM" secondAttribute="bottom" constant="10" id="QBc-i9-VOn"/>
-                    <constraint firstItem="TXg-4i-ifD" firstAttribute="centerY" secondItem="7YE-Q5-Ga6" secondAttribute="centerY" id="a1p-pU-qbP"/>
-                    <constraint firstItem="M6Q-FK-KFM" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="10" id="aaN-ZG-9yy"/>
-                    <constraint firstItem="7YE-Q5-Ga6" firstAttribute="leading" secondItem="TXg-4i-ifD" secondAttribute="trailing" constant="12" id="f4V-bp-uA6"/>
-                    <constraint firstItem="cN4-CV-0ZY" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="jtK-jp-ohZ"/>
-                    <constraint firstItem="M6Q-FK-KFM" firstAttribute="centerY" secondItem="TXg-4i-ifD" secondAttribute="centerY" id="lIc-z2-MZT"/>
-                    <constraint firstItem="cN4-CV-0ZY" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="xqp-sF-QJZ"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="addFolderButton" destination="M6Q-FK-KFM" id="kjf-Yh-hL2"/>
-                <outlet property="banFolderButton" destination="7YE-Q5-Ga6" id="2Ef-2r-gFE"/>
-                <outlet property="bannedTableColumn" destination="MyB-sf-7Zj" id="ViU-oo-A7U"/>
-                <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
-                <outlet property="libraryFolderTableView" destination="yXW-Oh-c8y" id="pKb-oj-bkV"/>
-                <outlet property="nameTableColumn" destination="yeU-u1-CWG" id="Dxp-QO-oXu"/>
-                <outlet property="pathTableColumn" destination="oY3-Hl-Pyi" id="fZs-RB-NLB"/>
-                <outlet property="presentTableColumn" destination="Bs6-l7-T2R" id="BLH-Ag-kYm"/>
-                <outlet property="removeFolderButton" destination="TXg-4i-ifD" id="h1S-AS-JhG"/>
-            </connections>
-            <point key="canvasLocation" x="60" y="199.5"/>
-        </window>
-    </objects>
-</document>
diff --git a/modules/gui/macosx/library/VLCLibraryFolderManagementWindow.h b/modules/gui/macosx/library/VLCLibraryFolderManagementWindow.h
deleted file mode 100644
index 4bf8e3d486..0000000000
--- a/modules/gui/macosx/library/VLCLibraryFolderManagementWindow.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * VLCLibraryFolderManagementWindow.h: MacOS X interface module
- *****************************************************************************
- * Copyright (C) 2019 VLC authors and VideoLAN
- *
- * Authors: Felix Paul Kühne <fkuehne # videolan -dot- org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#import <Cocoa/Cocoa.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
- at interface VLCLibraryFolderManagementWindowController : NSWindowController
-
- at end
-
- at interface VLCLibraryFolderManagementWindow : NSWindow <NSTableViewDelegate, NSTableViewDataSource>
-
- at property (readwrite, weak) IBOutlet NSTableView *libraryFolderTableView;
- at property (readwrite, weak) IBOutlet NSTableColumn *nameTableColumn;
- at property (readwrite, weak) IBOutlet NSTableColumn *pathTableColumn;
- at property (readwrite, weak) IBOutlet NSTableColumn *presentTableColumn;
- at property (readwrite, weak) IBOutlet NSTableColumn *bannedTableColumn;
- at property (readwrite, weak) IBOutlet NSButton *addFolderButton;
- at property (readwrite, weak) IBOutlet NSButton *removeFolderButton;
- at property (readwrite, weak) IBOutlet NSButton *banFolderButton;
-
-- (IBAction)addFolder:(id)sender;
-- (IBAction)removeFolder:(id)sender;
-- (IBAction)banFolder:(id)sender;
-
- at end
-
-NS_ASSUME_NONNULL_END
diff --git a/modules/gui/macosx/library/VLCLibraryFolderManagementWindow.m b/modules/gui/macosx/library/VLCLibraryFolderManagementWindow.m
deleted file mode 100644
index 097ab18c0d..0000000000
--- a/modules/gui/macosx/library/VLCLibraryFolderManagementWindow.m
+++ /dev/null
@@ -1,157 +0,0 @@
-/*****************************************************************************
- * VLCLibraryFolderManagementWindow.m: MacOS X interface module
- *****************************************************************************
- * Copyright (C) 2019 VLC authors and VideoLAN
- *
- * Authors: Felix Paul Kühne <fkuehne # videolan -dot- org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#import "VLCLibraryFolderManagementWindow.h"
-
-#import "main/VLCMain.h"
-#import "library/VLCLibraryController.h"
-#import "library/VLCLibraryModel.h"
-#import "library/VLCLibraryDataTypes.h"
-#import "extensions/NSString+Helpers.h"
-
- at implementation VLCLibraryFolderManagementWindowController
-
-- (void)windowDidLoad {
-    [super windowDidLoad];
-
-    VLCLibraryFolderManagementWindow *window = (VLCLibraryFolderManagementWindow *)self.window;
-    [window setTitle:_NS("Media Library")];
-    [window.addFolderButton setTitle:_NS("Add Folder...")];
-    [window.banFolderButton setTitle:_NS("Ban Folder")];
-    [window.removeFolderButton setTitle:_NS("Remove Folder")];
-    [window.nameTableColumn setTitle:_NS("Name")];
-    [window.presentTableColumn setTitle:_NS("Present")];
-    [window.bannedTableColumn setTitle:_NS("Banned")];
-    [window.pathTableColumn setTitle:_NS("Location")];
-}
-
- at end
-
- at interface VLCLibraryFolderManagementWindow ()
-{
-    NSArray *_cachedFolderList;
-    VLCLibraryController *_libraryController;
-}
- at end
-
- at implementation VLCLibraryFolderManagementWindow
-
-- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)style backing:(NSBackingStoreType)backingStoreType defer:(BOOL)flag
-{
-    self = [super initWithContentRect:contentRect styleMask:style backing:backingStoreType defer:flag];
-    if (self) {
-        _libraryController = [[VLCMain sharedInstance] libraryController];
-    }
-    return self;
-}
-
-- (void)awakeFromNib
-{
-    self.banFolderButton.enabled = self.removeFolderButton.enabled = NO;
-}
-
-- (void)makeKeyAndOrderFront:(id)sender
-{
-    [super makeKeyAndOrderFront:sender];
-    [self.libraryFolderTableView reloadData];
-}
-
-- (IBAction)addFolder:(id)sender
-{
-    NSOpenPanel *openPanel = [NSOpenPanel openPanel];
-    [openPanel setTitle:_NS("Add Folder")];
-    [openPanel setCanChooseFiles:NO];
-    [openPanel setCanChooseDirectories:YES];
-    [openPanel setAllowsMultipleSelection:YES];
-
-    NSModalResponse returnValue = [openPanel runModal];
-
-    if (returnValue == NSModalResponseOK) {
-        NSArray *URLs = [openPanel URLs];
-        NSUInteger count = [URLs count];
-        for (NSUInteger i = 0; i < count ; i++) {
-            NSURL *url = URLs[i];
-            [_libraryController addFolderWithFileURL:url];
-        }
-
-        _cachedFolderList = nil;
-        [self.libraryFolderTableView reloadData];
-    }
-}
-
-- (IBAction)banFolder:(id)sender
-{
-    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[self.libraryFolderTableView.selectedRow];
-    if (entryPoint.isBanned) {
-        [_libraryController unbanFolderWithFileURL:[NSURL URLWithString:entryPoint.MRL]];
-    } else {
-        [_libraryController banFolderWithFileURL:[NSURL URLWithString:entryPoint.MRL]];
-    }
-
-    _cachedFolderList = nil;
-    [self.libraryFolderTableView reloadData];
-}
-
-- (IBAction)removeFolder:(id)sender
-{
-    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[self.libraryFolderTableView.selectedRow];
-    [_libraryController removeFolderWithFileURL:[NSURL URLWithString:entryPoint.MRL]];
-
-    _cachedFolderList = nil;
-    [self.libraryFolderTableView reloadData];
-}
-
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
-{
-    if (!_cachedFolderList) {
-        _cachedFolderList = [[_libraryController libraryModel] listOfMonitoredFolders];
-    }
-    return _cachedFolderList.count;
-}
-
-- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
-{
-    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[row];
-    if (tableColumn == self.nameTableColumn) {
-        return [entryPoint.decodedMRL lastPathComponent];
-    } else if (tableColumn == self.presentTableColumn) {
-        return entryPoint.isPresent ? @"✔" : @"✘";
-    } else if (tableColumn == self.bannedTableColumn) {
-        return entryPoint.isBanned ? @"✔" : @"✘";
-    } else {
-        return entryPoint.decodedMRL;
-    }
-}
-
-- (void)tableViewSelectionDidChange:(NSNotification *)notification
-{
-    NSInteger selectedRow = self.libraryFolderTableView.selectedRow;
-    if (selectedRow == -1) {
-        self.banFolderButton.enabled = self.removeFolderButton.enabled = NO;
-        return;
-    }
-    self.banFolderButton.enabled = self.removeFolderButton.enabled = YES;
-    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[selectedRow];
-    [self.banFolderButton setTitle:entryPoint.isBanned ? _NS("Unban Folder") : _NS("Ban Folder")];
-}
-
- at end
diff --git a/modules/gui/macosx/menus/VLCMainMenu.h b/modules/gui/macosx/menus/VLCMainMenu.h
index 4b6ea5cfaf..049f610a30 100644
--- a/modules/gui/macosx/menus/VLCMainMenu.h
+++ b/modules/gui/macosx/menus/VLCMainMenu.h
@@ -66,7 +66,6 @@
 @property (readwrite, weak) IBOutlet NSMenuItem *toggleJumpButtons;
 @property (readwrite, weak) IBOutlet NSMenuItem *togglePlaymodeButtons;
 @property (readwrite, weak) IBOutlet NSMenuItem *toggleEffectsButton;
- at property (readwrite, weak) IBOutlet NSMenuItem *showLibraryFolders;
 @property (readwrite, weak) IBOutlet NSMenu *playlistTableColumnsMenu;
 @property (readwrite, weak) IBOutlet NSMenuItem *playlistTableColumns;
 
@@ -220,8 +219,6 @@
 - (IBAction)intfOpenCapture:(id)sender;
 - (IBAction)savePlaylist:(id)sender;
 
-- (IBAction)showLibraryFolders:(id)sender;
-
 - (IBAction)play:(id)sender;
 - (IBAction)stop:(id)sender;
 
diff --git a/modules/gui/macosx/menus/VLCMainMenu.m b/modules/gui/macosx/menus/VLCMainMenu.m
index e2b67ec4e4..655ab9da88 100644
--- a/modules/gui/macosx/menus/VLCMainMenu.m
+++ b/modules/gui/macosx/menus/VLCMainMenu.m
@@ -29,7 +29,6 @@
 #import "extensions/NSString+Helpers.h"
 
 #import "library/VLCLibraryWindow.h"
-#import "library/VLCLibraryFolderManagementWindow.h"
 
 #import "menus/renderers/VLCRendererMenuController.h"
 
@@ -95,7 +94,6 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
     VLCRendererMenuController *_rendererMenuController;
     VLCPlaylistController *_playlistController;
     VLCPlayerController *_playerController;
-    VLCLibraryFolderManagementWindowController *_libraryFoldersController;
     NSTimer *_cancelRendererDiscoveryTimer;
 
     NSMenu *_playlistTableColumnsContextMenu;
@@ -365,7 +363,6 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
     [_findItem setTitle: _NS("Find")];
 
     [_viewMenu setTitle: _NS("View")];
-    [_showLibraryFolders setTitle: _NS("Show Library Folders...")];
     [_playlistTableColumns setTitle: _NS("Playlist Table Columns")];
 
     [_controlsMenu setTitle: _NS("Playback")];
@@ -733,14 +730,6 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
 
 #pragma mark - View
 
-- (IBAction)showLibraryFolders:(id)sender
-{
-    if (!_libraryFoldersController) {
-        _libraryFoldersController = [[VLCLibraryFolderManagementWindowController alloc] initWithWindowNibName:@"VLCLibraryFolderManagementWindow"];
-    }
-    [_libraryFoldersController showWindow:sender];
-}
-
 #pragma mark - Playback
 
 - (IBAction)play:(id)sender
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.h b/modules/gui/macosx/preferences/VLCSimplePrefsController.h
index b7d0b49141..8b5fc5fbef 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.h
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.h
@@ -1,24 +1,25 @@
 /*****************************************************************************
-* VLCSimplePrefsController.h: Simple Preferences for Mac OS X
-*****************************************************************************
-* Copyright (C) 2008-2014 VLC authors and VideoLAN
-*
-* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
-*****************************************************************************/
+ * VLCSimplePrefsController.h: Simple Preferences for Mac OS X
+ *****************************************************************************
+ * Copyright (C) 2008-2019 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan dot org>
+ *          David Fuhrmann <dfuhrmann # videolan dot org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
 
 #import <Cocoa/Cocoa.h>
 
@@ -58,6 +59,17 @@
 @property (readwrite, weak) IBOutlet NSButtonCell *audio_autosavevol_yesButtonCell;
 @property (readwrite, weak) IBOutlet NSButtonCell *audio_autosavevol_noButtonCell;
 
+// library pane
+ at property (readwrite, strong) IBOutlet NSView *mediaLibraryView;
+ at property (readwrite, weak) IBOutlet NSTableView *mediaLibraryFolderTableView;
+ at property (readwrite, weak) IBOutlet NSTableColumn *mediaLibraryNameTableColumn;
+ at property (readwrite, weak) IBOutlet NSTableColumn *mediaLibraryPathTableColumn;
+ at property (readwrite, weak) IBOutlet NSTableColumn *mediaLibraryPresentTableColumn;
+ at property (readwrite, weak) IBOutlet NSTableColumn *mediaLibraryBannedTableColumn;
+ at property (readwrite, weak) IBOutlet NSButton *mediaLibraryAddFolderButton;
+ at property (readwrite, weak) IBOutlet NSButton *mediaLibraryRemoveFolderButton;
+ at property (readwrite, weak) IBOutlet NSButton *mediaLibraryBanFolderButton;
+
 // hotkeys pane
 @property (readwrite, strong) IBOutlet NSView *hotkeysView;
 
diff --git a/modules/gui/macosx/preferences/VLCSimplePrefsController.m b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
index 3884f7f05e..0f078fb711 100644
--- a/modules/gui/macosx/preferences/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/preferences/VLCSimplePrefsController.m
@@ -1,24 +1,26 @@
 /*****************************************************************************
-* VLCSimplePrefsController.m: Simple Preferences for Mac OS X
-*****************************************************************************
-* Copyright (C) 2008-2014 VLC authors and VideoLAN
-*
-* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
-*****************************************************************************/
+ * VLCSimplePrefsController.m: Simple Preferences for Mac OS X
+ *****************************************************************************
+ * Copyright (C) 2008-2019 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan dot org>
+ *          David Fuhrmann <dfuhrmann # videolan dot org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -45,6 +47,9 @@
 #import "main/VLCMain+OldPrefs.h"
 #import "os-integration/VLCClickerManager.h"
 #import "preferences/prefs.h"
+#import "library/VLCLibraryController.h"
+#import "library/VLCLibraryModel.h"
+#import "library/VLCLibraryDataTypes.h"
 
 static struct {
     const char iso[6];
@@ -125,8 +130,28 @@ static NSString* VLCAudioSettingToolbarIdentifier = @"Audio Settings Item Identi
 static NSString* VLCVideoSettingToolbarIdentifier = @"Video Settings Item Identifier";
 static NSString* VLCOSDSettingToolbarIdentifier = @"Subtitles Settings Item Identifier";
 static NSString* VLCInputSettingToolbarIdentifier = @"Input Settings Item Identifier";
+static NSString* VLCMediaLibrarySettingToolbarIdentifier = @"Media Library Settings Item Identifier";
 static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Identifier";
 
+ at interface VLCMediaLibraryFolderManagementController : NSObject <NSTableViewDelegate, NSTableViewDataSource>
+{
+    NSArray *_cachedFolderList;
+    VLCLibraryController *_libraryController;
+}
+
+ at property (readwrite, weak) NSTableView *libraryFolderTableView;
+ at property (readwrite, weak) NSTableColumn *nameTableColumn;
+ at property (readwrite, weak) NSTableColumn *pathTableColumn;
+ at property (readwrite, weak) NSTableColumn *presentTableColumn;
+ at property (readwrite, weak) NSTableColumn *bannedTableColumn;
+ at property (readwrite, weak) NSButton *removeFolderButton;
+ at property (readwrite, weak) NSButton *banFolderButton;
+
+- (IBAction)addFolder:(id)sender;
+- (IBAction)removeFolder:(id)sender;
+- (IBAction)banFolder:(id)sender;
+ at end
+
 @interface VLCSimplePrefsController() <NSToolbarDelegate, NSWindowDelegate>
 {
     BOOL _audioSettingChanged;
@@ -142,6 +167,7 @@ static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Id
     NSArray *_hotkeysNonUseableKeys;
     NSMutableArray *_hotkeySettings;
     NSString *_keyInTransition;
+    VLCMediaLibraryFolderManagementController *_mediaLibraryManagementController;
 
     intf_thread_t *p_intf;
 }
@@ -199,6 +225,31 @@ static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Id
     NSDictionary *views = @{ @"view": _contentView };
     NSArray *constraints = [NSLayoutConstraint constraintsWithVisualFormat:@"|[view]|" options:0 metrics:nil views:views];
     [clipView addConstraints:constraints];
+
+    [self setupMediaLibraryControlInterface];
+}
+
+- (void)setupMediaLibraryControlInterface
+{
+    _mediaLibraryManagementController = [[VLCMediaLibraryFolderManagementController alloc] init];
+    _mediaLibraryBanFolderButton.enabled = _mediaLibraryRemoveFolderButton.enabled = NO;
+
+    _mediaLibraryFolderTableView.delegate = _mediaLibraryManagementController;
+    _mediaLibraryFolderTableView.dataSource = _mediaLibraryManagementController;
+
+    _mediaLibraryManagementController.nameTableColumn = _mediaLibraryNameTableColumn;
+    _mediaLibraryManagementController.presentTableColumn = _mediaLibraryPresentTableColumn;
+    _mediaLibraryManagementController.bannedTableColumn = _mediaLibraryBannedTableColumn;
+    _mediaLibraryManagementController.pathTableColumn = _mediaLibraryPathTableColumn;
+    _mediaLibraryManagementController.removeFolderButton = _mediaLibraryRemoveFolderButton;
+    _mediaLibraryManagementController.banFolderButton = _mediaLibraryBanFolderButton;
+
+    _mediaLibraryAddFolderButton.target = _mediaLibraryManagementController;
+    _mediaLibraryAddFolderButton.action = @selector(addFolder:);
+    _mediaLibraryBanFolderButton.target = _mediaLibraryManagementController;
+    _mediaLibraryBanFolderButton.action = @selector(banFolder:);
+    _mediaLibraryRemoveFolderButton.target = _mediaLibraryManagementController;
+    _mediaLibraryRemoveFolderButton.action = @selector(removeFolder:);
 }
 
 #define CreateToolbarItem(name, desc, img, sel) \
@@ -239,6 +290,8 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
         CreateToolbarItem(_NS(SUBPIC_TITLE), _NS("Subtitle & On Screen Display Settings"), @"VLCSubtitleCone", showOSDSettings);
     } else if ([itemIdent isEqual: VLCInputSettingToolbarIdentifier]) {
         CreateToolbarItem(_NS(INPUT_TITLE), _NS("Input & Codec Settings"), @"VLCInputCone", showInputSettings);
+    } else if ([itemIdent isEqual: VLCMediaLibrarySettingToolbarIdentifier]) {
+        CreateToolbarItem(_NS("Media Library"), _NS("Media Library settings"), @"NXHelpBacktrack", showMediaLibrarySettings);
     } else if ([itemIdent isEqual: VLCHotkeysSettingToolbarIdentifier]) {
         CreateToolbarItem(_NS("Hotkeys"), _NS("Hotkeys settings"), @"VLCHotkeysCone", showHotkeySettings);
     }
@@ -249,21 +302,21 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
 - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar
 {
     return [NSArray arrayWithObjects:VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
-             VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
+             VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCMediaLibrarySettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
              NSToolbarFlexibleSpaceItemIdentifier, nil];
 }
 
 - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar
 {
     return [NSArray arrayWithObjects:VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
-             VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
+             VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCMediaLibrarySettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
              NSToolbarFlexibleSpaceItemIdentifier, nil];
 }
 
 - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
 {
     return [NSArray arrayWithObjects:VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
-             VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, nil];
+             VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCMediaLibrarySettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, nil];
 }
 
 - (void)initStrings
@@ -376,6 +429,15 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
     [_video_deinterlace_modeLabel setStringValue: _NS("Deinterlace mode")];
     [_video_videoBox setTitle: _NS("Video")];
 
+    /* media library */
+    [_mediaLibraryAddFolderButton setTitle:_NS("Add Folder...")];
+    [_mediaLibraryBanFolderButton setTitle:_NS("Ban Folder")];
+    [_mediaLibraryRemoveFolderButton setTitle:_NS("Remove Folder")];
+    [_mediaLibraryNameTableColumn setTitle:_NS("Name")];
+    [_mediaLibraryPresentTableColumn setTitle:_NS("Present")];
+    [_mediaLibraryBannedTableColumn setTitle:_NS("Banned")];
+    [_mediaLibraryPathTableColumn setTitle:_NS("Location")];
+
     /* generic stuff */
     [_showAllButton setTitle: _NS("Show All")];
     [_cancelButton setTitle: _NS("Cancel")];
@@ -1458,4 +1520,102 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
     }
 }
 
+- (void)showMediaLibrarySettings
+{
+    [self showSettingsForCategory:_mediaLibraryView];
+}
+
+
+ at end
+
+ at implementation VLCMediaLibraryFolderManagementController
+
+- (instancetype)init
+{
+    self = [super init];
+    if (self) {
+        _libraryController = [[VLCMain sharedInstance] libraryController];
+    }
+    return self;
+}
+
+- (IBAction)addFolder:(id)sender
+{
+    NSOpenPanel *openPanel = [NSOpenPanel openPanel];
+    [openPanel setTitle:_NS("Add Folder")];
+    [openPanel setCanChooseFiles:NO];
+    [openPanel setCanChooseDirectories:YES];
+    [openPanel setAllowsMultipleSelection:YES];
+
+    NSModalResponse returnValue = [openPanel runModal];
+
+    if (returnValue == NSModalResponseOK) {
+        NSArray *URLs = [openPanel URLs];
+        NSUInteger count = [URLs count];
+        for (NSUInteger i = 0; i < count ; i++) {
+            NSURL *url = URLs[i];
+            [_libraryController addFolderWithFileURL:url];
+        }
+
+        _cachedFolderList = nil;
+        [self.libraryFolderTableView reloadData];
+    }
+}
+
+- (IBAction)banFolder:(id)sender
+{
+    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[self.libraryFolderTableView.selectedRow];
+    if (entryPoint.isBanned) {
+        [_libraryController unbanFolderWithFileURL:[NSURL URLWithString:entryPoint.MRL]];
+    } else {
+        [_libraryController banFolderWithFileURL:[NSURL URLWithString:entryPoint.MRL]];
+    }
+
+    _cachedFolderList = nil;
+    [self.libraryFolderTableView reloadData];
+}
+
+- (IBAction)removeFolder:(id)sender
+{
+    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[self.libraryFolderTableView.selectedRow];
+    [_libraryController removeFolderWithFileURL:[NSURL URLWithString:entryPoint.MRL]];
+
+    _cachedFolderList = nil;
+    [self.libraryFolderTableView reloadData];
+}
+
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
+{
+    if (!_cachedFolderList) {
+        _cachedFolderList = [[_libraryController libraryModel] listOfMonitoredFolders];
+    }
+    return _cachedFolderList.count;
+}
+
+- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
+{
+    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[row];
+    if (tableColumn == self.nameTableColumn) {
+        return [entryPoint.decodedMRL lastPathComponent];
+    } else if (tableColumn == self.presentTableColumn) {
+        return entryPoint.isPresent ? @"✔" : @"✘";
+    } else if (tableColumn == self.bannedTableColumn) {
+        return entryPoint.isBanned ? @"✔" : @"✘";
+    } else {
+        return entryPoint.decodedMRL;
+    }
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+    NSInteger selectedRow = self.libraryFolderTableView.selectedRow;
+    if (selectedRow == -1) {
+        self.banFolderButton.enabled = self.removeFolderButton.enabled = NO;
+        return;
+    }
+    self.banFolderButton.enabled = self.removeFolderButton.enabled = YES;
+    VLCMediaLibraryEntryPoint *entryPoint = _cachedFolderList[selectedRow];
+    [self.banFolderButton setTitle:entryPoint.isBanned ? _NS("Unban Folder") : _NS("Ban Folder")];
+}
+
 @end
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0f8804d3a9..8b4f5d00d1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -472,8 +472,6 @@ modules/gui/macosx/library/VLCLibraryController.h
 modules/gui/macosx/library/VLCLibraryController.m
 modules/gui/macosx/library/VLCLibraryDataTypes.h
 modules/gui/macosx/library/VLCLibraryDataTypes.m
-modules/gui/macosx/library/VLCLibraryFolderManagementWindow.h
-modules/gui/macosx/library/VLCLibraryFolderManagementWindow.m
 modules/gui/macosx/library/VLCLibraryMenuController.h
 modules/gui/macosx/library/VLCLibraryMenuController.m
 modules/gui/macosx/library/VLCLibraryModel.h



More information about the vlc-commits mailing list