Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
  • abdsaber000/vlc
404 results
Show changes
Commits on Source (33)
Showing
with 497 additions and 111 deletions
......@@ -103,6 +103,7 @@
537976BA2A4319330036827E /* VLCSettingTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 537976B82A4319330036827E /* VLCSettingTextField.m */; };
5387FFF52A15127100A3A70A /* NSWindow+VLCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5387FFF42A15127100A3A70A /* NSWindow+VLCAdditions.m */; };
538A7EDA29A63EE40068AD4F /* VLCFullVideoViewWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 538A7ED929A63EE40068AD4F /* VLCFullVideoViewWindow.m */; };
538DC4E32A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 538DC4E22A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m */; };
53903D3A29576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 53903D3929576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m */; };
539BA79F298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 539BA79E298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.m */; };
539F114B29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 539F114A29E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.m */; };
......@@ -319,6 +320,8 @@
5387FFF42A15127100A3A70A /* NSWindow+VLCAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSWindow+VLCAdditions.m"; sourceTree = "<group>"; };
538A7ED829A63EE40068AD4F /* VLCFullVideoViewWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCFullVideoViewWindow.h; sourceTree = "<group>"; };
538A7ED929A63EE40068AD4F /* VLCFullVideoViewWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCFullVideoViewWindow.m; sourceTree = "<group>"; };
538DC4E22A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAudioGroupHeaderView.m; sourceTree = "<group>"; };
538DC4E42A6B69C00082DECD /* VLCLibraryAudioGroupHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioGroupHeaderView.h; sourceTree = "<group>"; };
53903D3829576ED500D0B308 /* VLCLibraryAudioGroupDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioGroupDataSource.h; sourceTree = "<group>"; };
53903D3929576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAudioGroupDataSource.m; sourceTree = "<group>"; };
539BA79D298C726200918C36 /* VLCAspectRatioRetainingVideoWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCAspectRatioRetainingVideoWindow.h; sourceTree = "<group>"; };
......@@ -340,6 +343,7 @@
53B447F3293BB47A00857588 /* VLCLibraryVideoTableViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryVideoTableViewDataSource.m; sourceTree = "<group>"; };
53B447F4293BB47A00857588 /* VLCLibraryVideoGroupDescriptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryVideoGroupDescriptor.m; sourceTree = "<group>"; };
53B447F5293BB47B00857588 /* VLCLibraryVideoCollectionViewsStackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryVideoCollectionViewsStackViewController.h; sourceTree = "<group>"; };
53BFB1E02A6A72160065EA7A /* VLCLibraryAudioGroupHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryAudioGroupHeaderView.xib; sourceTree = "<group>"; };
53ED472129C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioTableViewDelegate.h; sourceTree = "<group>"; };
53ED472229C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAudioTableViewDelegate.m; sourceTree = "<group>"; };
53ED472429C78FE700795DB1 /* VLCLibraryAudioGroupTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioGroupTableViewDelegate.h; sourceTree = "<group>"; };
......@@ -1372,6 +1376,8 @@
5325C5742930026600B2B63A /* audio-library */ = {
isa = PBXGroup;
children = (
538DC4E42A6B69C00082DECD /* VLCLibraryAudioGroupHeaderView.h */,
538DC4E22A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m */,
5325C57C29302E6800B2B63A /* VLCLibraryAudioViewController.h */,
5325C57B29302E6800B2B63A /* VLCLibraryAudioViewController.m */,
7DE82E7722843781002D341A /* VLCLibraryAlbumTableCellView.h */,
......@@ -1832,6 +1838,7 @@
6B82240B1E4D2A9000833BE1 /* VLCInformationWindow.xib */,
539F116A29F9756000F13460 /* VLCMainVideoViewAudioMediaDecorativeView.xib */,
7DE82E7A228437AA002D341A /* VLCLibraryAlbumTableCellView.xib */,
53BFB1E02A6A72160065EA7A /* VLCLibraryAudioGroupHeaderView.xib */,
536283FD2911476A00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib */,
536283FB2911476A00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib */,
7D0F64052202047900FDB91F /* VLCLibraryCollectionViewItem.xib */,
......@@ -2078,6 +2085,7 @@
533B5D2C29CF94C6003DE887 /* VLCBookmarksTableViewDataSource.m in Sources */,
1C3113D31E508C6900D4DD76 /* VLCResumeDialogController.m in Sources */,
7D2FFA40227B8A5B0085D649 /* VLCLinearProgressIndicator.m in Sources */,
538DC4E32A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m in Sources */,
7DFBDCB1226A518400B700A5 /* VLCLibraryMenuController.m in Sources */,
536283F8291146BC00640C15 /* VLCLibrarySongTableCellView.m in Sources */,
1C3113D51E508C6900D4DD76 /* VLCTextfieldPanelController.m in Sources */,
......
......@@ -163,6 +163,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m \
gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.h \
gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m \
gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h \
gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m \
gui/macosx/library/audio-library/VLCLibraryAudioGroupTableViewDelegate.h \
gui/macosx/library/audio-library/VLCLibraryAudioGroupTableViewDelegate.m \
gui/macosx/library/audio-library/VLCLibraryAudioTableViewDelegate.h \
......@@ -400,6 +402,7 @@ libmacosx_plugin_la_XIB_SOURCES = \
gui/macosx/UI/VLCCustomCropARPanel.xib \
gui/macosx/UI/VLCDetachedAudioWindow.xib \
gui/macosx/UI/VLCLibraryAlbumTableCellView.xib \
gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib \
gui/macosx/UI/VLCLibraryWindow.xib \
gui/macosx/UI/VLCLibraryTableCellView.xib \
gui/macosx/UI/VLCPlaylistTableCellView.xib \
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="System colors introduced in macOS 10.14" minToolsVersion="10.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="E6K-GD-bgu" customClass="VLCLibraryAudioGroupHeaderView">
<rect key="frame" x="0.0" y="0.0" width="730" height="86"/>
<subviews>
<box boxType="custom" borderType="line" cornerRadius="5" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="dxP-Cv-lN2">
<rect key="frame" x="0.0" y="0.0" width="730" height="86"/>
<view key="contentView" id="XfC-Xr-mxJ">
<rect key="frame" x="1" y="1" width="728" height="84"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<color key="borderColor" name="separatorColor" catalog="System" colorSpace="catalog"/>
<color key="fillColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</box>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="10" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0Si-IF-hfH">
<rect key="frame" x="10" y="10" width="710" height="66"/>
<subviews>
<customView verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="Yyj-ln-1hz">
<rect key="frame" x="0.0" y="26" width="710" height="40"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VGp-RV-Jl4">
<rect key="frame" x="-2" y="6" width="144" height="28"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Audio Group" id="96R-yZ-Dap">
<font key="font" metaFont="systemBold" size="24"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<stackView distribution="fill" orientation="horizontal" alignment="top" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eE7-fJ-MtS">
<rect key="frame" x="553" y="6" width="157" height="28"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UDD-gH-RDW">
<rect key="frame" x="-6" y="-6" width="88" height="40"/>
<buttonCell key="cell" type="push" title="Play" bezelStyle="rounded" image="play.fill" catalog="system" imagePosition="leading" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="1xa-VB-LBX">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<color key="bezelColor" name="VLCAccentColor"/>
<connections>
<action selector="play:" target="E6K-GD-bgu" id="vp4-Ar-psi"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Baf-bX-D7M">
<rect key="frame" x="75" y="-6" width="88" height="40"/>
<buttonCell key="cell" type="push" title="Queue" bezelStyle="rounded" image="NSAddTemplate" imagePosition="leading" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="hql-tL-GoL">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="enqueue:" target="E6K-GD-bgu" id="MmL-OA-W6A"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="UDD-gH-RDW" firstAttribute="centerY" secondItem="eE7-fJ-MtS" secondAttribute="centerY" id="7pl-Xu-lre"/>
<constraint firstItem="Baf-bX-D7M" firstAttribute="centerY" secondItem="eE7-fJ-MtS" secondAttribute="centerY" id="AMr-ZS-8Ot"/>
<constraint firstItem="UDD-gH-RDW" firstAttribute="width" secondItem="Baf-bX-D7M" secondAttribute="width" id="N5Y-W0-Y5P"/>
<constraint firstAttribute="width" constant="157" id="hWf-p4-ES0"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="eE7-fJ-MtS" secondAttribute="trailing" id="Ko4-Yr-Zzj"/>
<constraint firstItem="VGp-RV-Jl4" firstAttribute="leading" secondItem="Yyj-ln-1hz" secondAttribute="leading" id="Oed-yO-cxQ"/>
<constraint firstAttribute="height" constant="40" id="UZ9-lj-BXD"/>
<constraint firstItem="eE7-fJ-MtS" firstAttribute="centerY" secondItem="Yyj-ln-1hz" secondAttribute="centerY" id="XWb-3l-7qH"/>
<constraint firstItem="VGp-RV-Jl4" firstAttribute="centerY" secondItem="Yyj-ln-1hz" secondAttribute="centerY" id="fgu-OU-KwU"/>
<constraint firstItem="eE7-fJ-MtS" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="VGp-RV-Jl4" secondAttribute="trailing" constant="10" id="fsv-ju-hNO"/>
</constraints>
</customView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8Fd-yT-2AG">
<rect key="frame" x="-2" y="0.0" width="714" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="0 albums, 0 songs" id="Tmx-ap-c2a">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="Yyj-ln-1hz" firstAttribute="leading" secondItem="0Si-IF-hfH" secondAttribute="leading" id="Ci0-Wg-TUY"/>
<constraint firstItem="8Fd-yT-2AG" firstAttribute="leading" secondItem="0Si-IF-hfH" secondAttribute="leading" id="Kyd-AH-vSN"/>
<constraint firstAttribute="trailing" secondItem="Yyj-ln-1hz" secondAttribute="trailing" id="LeP-os-gHu"/>
<constraint firstAttribute="trailing" secondItem="8Fd-yT-2AG" secondAttribute="trailing" id="VyH-Uu-36X"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="dxP-Cv-lN2" secondAttribute="bottom" id="3Z8-gS-rVm"/>
<constraint firstItem="dxP-Cv-lN2" firstAttribute="leading" secondItem="E6K-GD-bgu" secondAttribute="leading" id="IVx-Qi-Hdt"/>
<constraint firstItem="dxP-Cv-lN2" firstAttribute="top" secondItem="E6K-GD-bgu" secondAttribute="top" id="Rbe-hF-1hS"/>
<constraint firstItem="0Si-IF-hfH" firstAttribute="top" secondItem="E6K-GD-bgu" secondAttribute="top" constant="10" id="fw0-cv-Ofa"/>
<constraint firstAttribute="trailing" secondItem="dxP-Cv-lN2" secondAttribute="trailing" id="iTk-8w-5CF"/>
<constraint firstAttribute="trailing" secondItem="0Si-IF-hfH" secondAttribute="trailing" constant="10" id="mM3-Iy-sSh"/>
<constraint firstAttribute="bottom" secondItem="0Si-IF-hfH" secondAttribute="bottom" constant="10" id="sUV-bu-8ug"/>
<constraint firstItem="0Si-IF-hfH" firstAttribute="leading" secondItem="E6K-GD-bgu" secondAttribute="leading" constant="10" id="vM8-9F-b9Q"/>
</constraints>
<connections>
<outlet property="detailTextField" destination="8Fd-yT-2AG" id="VVh-Xd-Ma1"/>
<outlet property="playButton" destination="UDD-gH-RDW" id="Cvj-Zy-lA5"/>
<outlet property="queueButton" destination="Baf-bX-D7M" id="LXJ-9K-2zU"/>
<outlet property="titleTextField" destination="VGp-RV-Jl4" id="G9K-eO-d5s"/>
</connections>
<point key="canvasLocation" x="-588" y="-314"/>
</customView>
</objects>
<resources>
<image name="NSAddTemplate" width="18" height="17"/>
<image name="play.fill" catalog="system" width="12" height="13"/>
<namedColor name="VLCAccentColor">
<color red="1" green="0.37999999523162842" blue="0.039999999105930328" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -231,7 +231,16 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
// Computed attributes from parent
NSMutableArray<__kindof NSCollectionViewLayoutAttributes *> *layoutAttributesArray = [[super layoutAttributesForElementsInRect:rect] mutableCopy];
for (int i = 0; i < layoutAttributesArray.count; i++) {
NSCollectionViewLayoutAttributes *attributes = layoutAttributesArray[i];
NSCollectionViewLayoutAttributes * const attributes = layoutAttributesArray[i];
NSString * const elementKind = attributes.representedElementKind;
if (@available(macOS 10.12, *)) {
if (([elementKind isEqualToString:NSCollectionElementKindSectionHeader] && self.sectionHeadersPinToVisibleBounds) ||
([elementKind isEqualToString:NSCollectionElementKindSectionFooter] && self.sectionFootersPinToVisibleBounds)) {
continue;
}
}
[attributes setFrame:[self frameForDisplacedAttributes:attributes]];
layoutAttributesArray[i] = attributes;
}
......@@ -318,7 +327,8 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
# pragma mark - Calculation of displaced frame attributes
- (NSRect)frameForDisplacedAttributes:(NSCollectionViewLayoutAttributes *)inAttributes {
- (NSRect)frameForDisplacedAttributes:(NSCollectionViewLayoutAttributes *)inAttributes
{
if(inAttributes == nil) {
return NSZeroRect;
}
......
......@@ -257,4 +257,10 @@ extern const long long int VLCMediaLibraryMediaItemDurationDenominator;
@end
@interface VLCMediaLibraryAllItemsGroup : VLCMediaLibraryDummyItem<VLCMediaLibraryAudioGroupProtocol>
- (nullable instancetype)initWithDisplayString:(NSString *)displayString;
@end
NS_ASSUME_NONNULL_END
......@@ -26,6 +26,8 @@
#import "extensions/NSString+Helpers.h"
#import "library/VLCInputItem.h"
#import "library/VLCLibraryImageCache.h"
#import "library/VLCLibraryController.h"
#import "library/VLCLibraryModel.h"
#import <vlc_url.h>
......@@ -1177,7 +1179,6 @@ static NSArray<VLCMediaLibraryArtist *> *fetchArtistsForLibraryItem(library_arti
@synthesize smallArtworkGenerated = _smallArtworkGenerated;
@synthesize smallArtworkMRL = _smallArtworkMRL;
- (instancetype)initWithDisplayString:(NSString*)displayString
withDetailString:(NSString*)detailString
{
......@@ -1193,8 +1194,36 @@ static NSArray<VLCMediaLibraryArtist *> *fetchArtistsForLibraryItem(library_arti
return self;
}
- (void)iterateMediaItemsWithBlock:(nonnull void (^)(VLCMediaLibraryMediaItem * _Nonnull))mediaItemBlock {
- (void)iterateMediaItemsWithBlock:(nonnull void (^)(VLCMediaLibraryMediaItem * _Nonnull))mediaItemBlock
{
return;
}
- (void)revealInFinder
{
return;
}
@end
@implementation VLCMediaLibraryAllItemsGroup
@synthesize albums = _albums;
@synthesize artists = _artists;
@synthesize numberOfTracks = _numberOfTracks;
@synthesize tracksAsMediaItems = _tracksAsMediaItems;
- (instancetype)initWithDisplayString:(NSString *)displayString
{
VLCLibraryModel * const libraryModel = VLCMain.sharedInstance.libraryController.libraryModel;
_albums = libraryModel.listOfAlbums;
_artists = libraryModel.listOfArtists;
_numberOfTracks = libraryModel.numberOfAudioMedia;
_tracksAsMediaItems = libraryModel.listOfAudioMedia;
NSString * const detailString = [NSString stringWithFormat:_NS("%li albums, %li songs"), _albums.count, _tracksAsMediaItems.count];
return [super initWithDisplayString:displayString withDetailString:detailString];
}
@end
......@@ -82,6 +82,10 @@ const CGFloat VLCLibraryTracksRowHeight = 40.;
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
forTableView:(NSTableView *)tableView
{
if (row < 0 || row >= self.tracks.count) {
return nil;
}
return self.tracks[row];
}
......
......@@ -59,16 +59,14 @@ extern NSString * const VLCLibraryYearSortDescriptorKey;
@property (readwrite, assign) VLCLibraryModel *libraryModel;
@property (readwrite, assign) VLCLibraryAudioGroupDataSource *audioGroupDataSource;
@property (readwrite, assign) NSTableView *collectionSelectionTableView;
@property (readwrite, assign) NSTableView *groupSelectionTableView;
@property (readwrite, assign) NSTableView *songsTableView;
@property (readwrite, assign) NSCollectionView *collectionView;
@property (readwrite, assign) NSTableView *gridModeListTableView;
@property (readwrite, assign) NSCollectionView *gridModeListSelectionCollectionView;
@property (nonatomic, readwrite, assign) VLCAudioLibrarySegment audioLibrarySegment;
+ (void)setupCollectionView:(NSCollectionView *)collectionView;
- (void)setup;
- (void)setupCollectionView:(NSCollectionView *)collectionView;
- (void)reloadData;
- (void)tableView:(NSTableView * const)tableView selectRow:(NSInteger)row;
......
......@@ -80,6 +80,7 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
}
@property (readwrite, atomic) NSArray *displayedCollection;
@property (readonly) BOOL displayAllArtistsGenresTableEntry;
@end
......@@ -345,12 +346,6 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
forTableView:_collectionSelectionTableView];
}
const NSInteger groupSelectionTableViewRow = _groupSelectionTableView.selectedRow;
if(groupSelectionTableViewRow >= 0 && !_groupSelectionTableView.hidden) {
_selectedGroupSelectionTableViewItem = [self libraryItemAtRow:groupSelectionTableViewRow
forTableView:_groupSelectionTableView];
}
const NSInteger songsTableViewRow = _songsTableView.selectedRow;
if(songsTableViewRow >= 0 && !_songsTableView.hidden) {
_selectedSongTableViewItem = [self libraryItemAtRow:songsTableViewRow
......@@ -372,7 +367,6 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
{
[self restoreCollectionViewSelectionState];
[self restoreCollectionSelectionTableViewSelectionState];
[self restoreGroupSelectionTableViewSelectionState];
[self restoreSongTableViewSelectionState];
}
......@@ -422,13 +416,6 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
_selectedCollectionSelectionTableViewItem = nil;
}
- (void)restoreGroupSelectionTableViewSelectionState
{
[self restoreSelectionStateForTableView:_groupSelectionTableView
withSelectedItem:_selectedGroupSelectionTableViewItem];
_selectedGroupSelectionTableViewItem = nil;
}
- (void)restoreSongTableViewSelectionState
{
[self restoreSelectionStateForTableView:_songsTableView
......@@ -438,14 +425,13 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
- (void)setup
{
[self setupCollectionView:_collectionView];
[self setupCollectionView:_gridModeListSelectionCollectionView];
[VLCLibraryAudioDataSource setupCollectionView:_collectionView];
[self setupTableViews];
_audioLibrarySegment = -1; // Force setAudioLibrarySegment to do something always on first try
}
- (void)setupCollectionView:(NSCollectionView *)collectionView
+ (void)setupCollectionView:(NSCollectionView *)collectionView
{
[collectionView registerClass:[VLCLibraryCollectionViewItem class] forItemWithIdentifier:VLCLibraryCellIdentifier];
......@@ -467,14 +453,11 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
- (void)setupTableViews
{
_groupSelectionTableView.target = self;
_groupSelectionTableView.doubleAction = @selector(groubSelectionDoubleClickAction:);
_collectionSelectionTableView.target = self;
_collectionSelectionTableView.doubleAction = @selector(collectionSelectionDoubleClickAction:);
_gridModeListTableView.target = self;
_gridModeListTableView.doubleAction = @selector(groubSelectionDoubleClickAction:);
_gridModeListTableView.doubleAction = @selector(groupSelectionDoubleClickAction:);
[self setupSongsTableView];
}
......@@ -526,12 +509,12 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
- (void)setupExistingSortForTableView:(NSTableView *)tableView
{
const VLCLibraryController * const libraryController = VLCMain.sharedInstance.libraryController;
VLCLibraryController * const libraryController = VLCMain.sharedInstance.libraryController;
const vlc_ml_sorting_criteria_t existingSortCriteria = libraryController.lastSortingCriteria;
NSString *sortDescriptorKey = [self sortDescriptorKeyFromVlcMlSortingCriteria:existingSortCriteria];
const NSSortDescriptor * const sortDescriptor = [[NSSortDescriptor alloc] initWithKey:sortDescriptorKey
ascending:!libraryController.descendingLibrarySorting];
NSString * const sortDescriptorKey = [self sortDescriptorKeyFromVlcMlSortingCriteria:existingSortCriteria];
NSSortDescriptor * const sortDescriptor = [[NSSortDescriptor alloc] initWithKey:sortDescriptorKey
ascending:!libraryController.descendingLibrarySorting];
tableView.sortDescriptors = @[sortDescriptor];
}
......@@ -568,11 +551,6 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
[collectionViewFlowLayout resetLayout];
}
VLCLibraryCollectionViewFlowLayout *gridModeListSelectionCollectionViewFlowLayout = (VLCLibraryCollectionViewFlowLayout *)_gridModeListSelectionCollectionView.collectionViewLayout;
if (gridModeListSelectionCollectionViewFlowLayout) {
[gridModeListSelectionCollectionViewFlowLayout resetLayout];
}
operation();
[self setupExistingSortForTableView:_songsTableView];
}
......@@ -583,12 +561,25 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
[self retainSelectedMediaItem];
self.displayedCollection = [self collectionToDisplay];
if (self.displayAllArtistsGenresTableEntry) {
NSMutableArray * const mutableCollectionCopy = self.displayedCollection.mutableCopy;
VLCMediaLibraryAllItemsGroup *group;
if (_currentParentType == VLC_ML_PARENT_GENRE) {
group = [[VLCMediaLibraryAllItemsGroup alloc] initWithDisplayString:_NS("All genres")];
} else if (_currentParentType == VLC_ML_PARENT_ARTIST) {
group = [[VLCMediaLibraryAllItemsGroup alloc] initWithDisplayString:_NS("All artists")];
}
NSAssert(group != nil, @"All items group should not be nil");
[mutableCollectionCopy insertObject:group atIndex:0];
self.displayedCollection = mutableCollectionCopy;
}
[self resetLayoutsForOperation:^{
[self.collectionView reloadData];
[self.gridModeListTableView reloadData];
[self.gridModeListSelectionCollectionView reloadData];
[self.collectionSelectionTableView reloadData];
[self.groupSelectionTableView reloadData];
[self.songsTableView reloadData];
}];
[self restoreSelectionState];
......@@ -625,13 +616,7 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
[self.songsTableView reloadDataForRowIndexes:rowIndexSet columnIndexes:songsTableColumnIndexSet];
// Don't update gridModeListSelectionCollectionView, let its VLCLibraryAudioGroupDataSource do it.
// TODO: Stop splitting functionality for these audio source selection views between this data source
// TODO: and the VLCLibraryAudioGroupDataSource, it is super confusing
// Also don't update:
// - gridModeListTableView, as this will only show artists/genres
// - collectionSelectionTableView, as this will only show artists/genres/albums
// - groupSelectionTableView, as this shows cells for albums (and each cell has its own data source with media items)
// Also don't update collectionSelectionTableView, as this will only show artists/genres/albums
}];
}
......@@ -666,28 +651,28 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
_audioLibrarySegment = audioLibrarySegment;
switch (_audioLibrarySegment) {
case VLCAudioLibraryArtistsSegment:
self.displayedCollection = [self.libraryModel listOfArtists];
_currentParentType = VLC_ML_PARENT_ARTIST;
break;
case VLCAudioLibraryAlbumsSegment:
self.displayedCollection = [self.libraryModel listOfAlbums];
_currentParentType = VLC_ML_PARENT_ALBUM;
break;
case VLCAudioLibrarySongsSegment:
self.displayedCollection = [self.libraryModel listOfAudioMedia];
_currentParentType = VLC_ML_PARENT_UNKNOWN;
break;
case VLCAudioLibraryGenresSegment:
self.displayedCollection = [self.libraryModel listOfGenres];
_currentParentType = VLC_ML_PARENT_GENRE;
break;
default:
NSAssert(1, @"reached the unreachable");
break;
}
_audioGroupDataSource.representedListOfAlbums = nil; // Clear whatever was being shown before
_audioGroupDataSource.representedAudioGroup = nil; // Clear whatever was being shown before
[_songsTableView deselectAll:self];
[_collectionSelectionTableView deselectAll:self];
[_collectionView deselectAll:self];
[self reloadData];
}
......@@ -701,24 +686,14 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
{
const NSInteger numItems = self.displayedCollection.count;
return [self displayAllArtistsGenresTableEntry] ? numItems + 1 : numItems;
return self.displayedCollection.count;
}
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
forTableView:(NSTableView *)tableView
{
BOOL viewDisplayingAllItemsEntry = [self displayAllArtistsGenresTableEntry];
BOOL provideAllItemsEntry = viewDisplayingAllItemsEntry && row == 0;
if (provideAllItemsEntry && _currentParentType == VLC_ML_PARENT_GENRE) {
return [[VLCMediaLibraryDummyItem alloc] initWithDisplayString:_NS("All genres")
withDetailString:@""];
} else if (provideAllItemsEntry && _currentParentType == VLC_ML_PARENT_ARTIST) {
return [[VLCMediaLibraryDummyItem alloc] initWithDisplayString:_NS("All artists")
withDetailString:@""];
} else if (viewDisplayingAllItemsEntry) {
return self.displayedCollection[row - 1];
if (row < 0 || row >= self.displayedCollection.count) {
return nil;
}
return self.displayedCollection[row];
......@@ -728,7 +703,7 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
{
NSParameterAssert(tableView);
if (tableView != _collectionSelectionTableView && tableView != _groupSelectionTableView && tableView != _gridModeListTableView) {
if (tableView != _collectionSelectionTableView && tableView != _gridModeListTableView) {
return;
}
......@@ -737,29 +712,15 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
}
const NSInteger selectedRow = tableView.selectedRow;
const BOOL showingAllItemsEntry = [self displayAllArtistsGenresTableEntry];
const NSInteger libraryItemIndex = showingAllItemsEntry ? selectedRow - 1 : selectedRow;
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
if (libraryItemIndex < 0 && showingAllItemsEntry) {
self->_audioGroupDataSource.representedListOfAlbums = self->_libraryModel.listOfAlbums;
} else {
id<VLCMediaLibraryItemProtocol> libraryItem = self.displayedCollection[libraryItemIndex];
if (self->_currentParentType == VLC_ML_PARENT_ALBUM) {
self->_audioGroupDataSource.representedListOfAlbums = @[(VLCMediaLibraryAlbum *)libraryItem];
} else if(self->_currentParentType != VLC_ML_PARENT_UNKNOWN) {
self->_audioGroupDataSource.representedListOfAlbums = [self->_libraryModel listAlbumsOfParentType:self->_currentParentType forID:libraryItem.libraryID];
} else { // FIXME: we have nothing to show here
self->_audioGroupDataSource.representedListOfAlbums = nil;
}
}
if (selectedRow >= self.displayedCollection.count) {
return;
}
dispatch_async(dispatch_get_main_queue(), ^{
[self.groupSelectionTableView reloadData];
[self.gridModeListSelectionCollectionView reloadData];
});
});
if (_currentParentType == VLC_ML_PARENT_UNKNOWN || selectedRow < 0) {
_audioGroupDataSource.representedAudioGroup = nil;
} else {
_audioGroupDataSource.representedAudioGroup = self.displayedCollection[selectedRow];
}
}
- (void)tableView:(NSTableView *)tableView sortDescriptorsDidChange:(NSArray<NSSortDescriptor *> *)oldDescriptors
......@@ -805,18 +766,17 @@ NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
#pragma mark - table view double click actions
- (void)groubSelectionDoubleClickAction:(id)sender
- (void)groupSelectionDoubleClickAction:(id)sender
{
NSArray *listOfAlbums = _audioGroupDataSource.representedListOfAlbums;
NSUInteger albumCount = listOfAlbums.count;
NSInteger clickedRow = _groupSelectionTableView.clickedRow;
NSTableView * const tableView = (NSTableView *)sender;
NSParameterAssert(tableView != nil);
if (!listOfAlbums || albumCount == 0 || clickedRow > albumCount) {
return;
}
const NSInteger clickedRow = tableView.clickedRow;
id<VLCMediaLibraryItemProtocol> libraryItem = self.displayedCollection[clickedRow - 1];
NSArray * const tracks = [listOfAlbums[clickedRow] tracksAsMediaItems];
[VLCMain.sharedInstance.libraryController appendItemsToPlaylist:tracks playFirstItemImmediately:YES];
[libraryItem iterateMediaItemsWithBlock:^(VLCMediaLibraryMediaItem* mediaItem) {
[VLCMain.sharedInstance.libraryController appendItemToPlaylist:mediaItem playImmediately:YES];
}];
}
- (void)collectionSelectionDoubleClickAction:(id)sender
......@@ -901,7 +861,13 @@ viewForSupplementaryElementOfKind:(NSCollectionViewSupplementaryElementKind)kind
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtIndexPath:(NSIndexPath *)indexPath
forCollectionView:(NSCollectionView *)collectionView
{
return self.displayedCollection[indexPath.item];
const NSUInteger indexPathItem = indexPath.item;
if (indexPathItem < 0 || indexPathItem >= self.displayedCollection.count) {
return nil;
}
return self.displayedCollection[indexPathItem];
}
@end
......@@ -28,12 +28,16 @@
NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryModel;
@class VLCLibraryAudioGroupDataSource;
@class VLCMediaLibraryAlbum;
@protocol VLCMediaLibraryAudioGroupProtocol;
@interface VLCLibraryAudioGroupDataSource : NSObject <VLCLibraryTableViewDataSource, VLCLibraryCollectionViewDataSource>
@property (readwrite, atomic, retain, nullable) NSArray <VLCMediaLibraryAlbum *> *representedListOfAlbums;
@property (readwrite, nonatomic, retain, nullable) id<VLCMediaLibraryAudioGroupProtocol> representedAudioGroup;
@property (readwrite, atomic, retain) NSArray <NSTableView *> *tableViews;
@property (readwrite, atomic, retain) NSArray <NSCollectionView *> *collectionViews;
+ (void)setupCollectionView:(NSCollectionView *)collectionView;
@end
......
......@@ -26,18 +26,73 @@
#import "main/VLCMain.h"
#import "library/VLCLibraryController.h"
#import "library/VLCLibraryDataTypes.h"
#import "library/VLCLibraryCollectionViewItem.h"
#import "library/VLCLibraryCollectionViewFlowLayout.h"
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryWindow.h"
#import "library/audio-library/VLCLibraryAlbumTableCellView.h"
#import "library/audio-library/VLCLibraryAudioGroupHeaderView.h"
#import "library/audio-library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.h"
#import "views/VLCSubScrollView.h"
@interface VLCLibraryAudioGroupDataSource ()
@property (readwrite, atomic, strong) NSArray<VLCMediaLibraryAlbum *> *representedListOfAlbums;
@end
@implementation VLCLibraryAudioGroupDataSource
+ (void)setupCollectionView:(NSCollectionView *)collectionView
{
NSNib * const audioGroupHeaderView = [[NSNib alloc] initWithNibNamed:@"VLCLibraryAudioGroupHeaderView"
bundle:nil];
[collectionView registerNib:audioGroupHeaderView
forSupplementaryViewOfKind:NSCollectionElementKindSectionHeader
withIdentifier:VLCLibraryAudioGroupHeaderViewIdentifier];
}
- (void)reloadViews
{
for (NSTableView * const tableView in _tableViews) {
[tableView reloadData];
}
for (NSCollectionView * const collectionView in _collectionViews) {
[collectionView reloadData];
}
}
- (void)updateRepresentedListOfAlbums
{
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
VLCLibraryModel * const libraryModel = VLCMain.sharedInstance.libraryController.libraryModel;
if (self.representedAudioGroup == nil) {
self.representedListOfAlbums = libraryModel.listOfAlbums;
} else {
self.representedListOfAlbums = self.representedAudioGroup.albums;
}
dispatch_async(dispatch_get_main_queue(), ^{
[self reloadViews];
});
});
}
- (void)setRepresentedAudioGroup:(VLCAbstractMediaLibraryAudioGroup *)representedAudioGroup
{
if (representedAudioGroup == _representedAudioGroup) {
return;
}
_representedAudioGroup = representedAudioGroup;
[self updateRepresentedListOfAlbums];
}
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
{
if (self.representedListOfAlbums != nil) {
......@@ -50,6 +105,10 @@
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
forTableView:(NSTableView *)tableView
{
if (row < 0 || row >= self.representedListOfAlbums.count) {
return nil;
}
return self.representedListOfAlbums[row];
}
......@@ -88,6 +147,10 @@ viewForSupplementaryElementOfKind:(NSCollectionViewSupplementaryElementKind)kind
return albumSupplementaryDetailView;
} else if ([kind isEqualToString:NSCollectionElementKindSectionHeader]) {
VLCLibraryAudioGroupHeaderView * const headerView = [collectionView makeSupplementaryViewOfKind:kind withIdentifier:VLCLibraryAudioGroupHeaderViewIdentifier forIndexPath:indexPath];
headerView.representedItem = _representedAudioGroup;
return headerView;
}
return nil;
......@@ -103,7 +166,13 @@ viewForSupplementaryElementOfKind:(NSCollectionViewSupplementaryElementKind)kind
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtIndexPath:(NSIndexPath *)indexPath
forCollectionView:(NSCollectionView *)collectionView
{
return self.representedListOfAlbums[indexPath.item];
const NSUInteger indexPathItem = indexPath.item;
if (indexPathItem < 0 || indexPathItem >= self.representedListOfAlbums.count) {
return nil;
}
return self.representedListOfAlbums[indexPathItem];
}
@end
/*****************************************************************************
* VLCLibraryAudioGroupHeaderView.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2023 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* 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
@protocol VLCMediaLibraryAudioGroupProtocol;
extern NSString * const VLCLibraryAudioGroupHeaderViewIdentifier;
@interface VLCLibraryAudioGroupHeaderView : NSView
@property (class, readonly) const CGSize defaultHeaderSize;
@property (readwrite, retain, nonatomic) id<VLCMediaLibraryAudioGroupProtocol> representedItem;
@property (readwrite, weak) IBOutlet NSTextField *titleTextField;
@property (readwrite, weak) IBOutlet NSTextField *detailTextField;
@property (readwrite, weak) IBOutlet NSButton *playButton;
@property (readwrite, weak) IBOutlet NSButton *queueButton;
- (IBAction)play:(id)sender;
- (IBAction)enqueue:(id)sender;
@end
NS_ASSUME_NONNULL_END
/*****************************************************************************
* VLCLibraryAudioGroupHeaderView.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2023 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* 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 "VLCLibraryAudioGroupHeaderView.h"
#import "extensions/NSColor+VLCAdditions.h"
#import "main/VLCMain.h"
#import "library/VLCLibraryController.h"
#import "library/VLCLibraryDataTypes.h"
NSString * const VLCLibraryAudioGroupHeaderViewIdentifier = @"VLCLibraryAudioGroupHeaderViewIdentifier";
@implementation VLCLibraryAudioGroupHeaderView
+ (CGSize)defaultHeaderSize
{
return CGSizeMake(690., 86.);
}
- (void)awakeFromNib
{
if (@available(macOS 10.14, *)) {
_playButton.bezelColor = NSColor.VLCAccentColor;
}
}
- (void)updateRepresentation
{
if (_representedItem == nil) {
_titleTextField.stringValue = @"Unknown";
_detailTextField.stringValue = @"Unknown";
return;
}
_titleTextField.stringValue = _representedItem.displayString;
_detailTextField.stringValue = _representedItem.detailString;
}
- (void)setRepresentedItem:(id<VLCMediaLibraryAudioGroupProtocol>)representedItem
{
if (representedItem == _representedItem) {
return;
}
_representedItem = representedItem;
[self updateRepresentation];
}
- (IBAction)play:(id)sender
{
VLCLibraryController * const libraryController = VLCMain.sharedInstance.libraryController;
// We want to add all the tracks to the playlist but only play the first one immediately,
// otherwise we will skip straight to the last track of the last album from the artist
__block BOOL playImmediately = YES;
[_representedItem iterateMediaItemsWithBlock:^(VLCMediaLibraryMediaItem* mediaItem) {
[libraryController appendItemToPlaylist:mediaItem playImmediately:playImmediately];
if(playImmediately) {
playImmediately = NO;
}
}];
}
- (IBAction)enqueue:(id)sender
{
VLCLibraryController * const libraryController = VLCMain.sharedInstance.libraryController;
[_representedItem iterateMediaItemsWithBlock:^(VLCMediaLibraryMediaItem* mediaItem) {
[libraryController appendItemToPlaylist:mediaItem playImmediately:NO];
}];
}
@end
......@@ -36,6 +36,7 @@
#import "library/audio-library/VLCLibraryAlbumTableCellView.h"
#import "library/audio-library/VLCLibraryAudioDataSource.h"
#import "library/audio-library/VLCLibraryAudioGroupDataSource.h"
#import "library/audio-library/VLCLibraryAudioGroupHeaderView.h"
#import "library/audio-library/VLCLibraryAudioGroupTableViewDelegate.h"
#import "library/audio-library/VLCLibraryAudioTableViewDelegate.h"
......@@ -133,14 +134,14 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
_audioDataSource = [[VLCLibraryAudioDataSource alloc] init];
_audioDataSource.libraryModel = VLCMain.sharedInstance.libraryController.libraryModel;
_audioDataSource.collectionSelectionTableView = _audioCollectionSelectionTableView;
_audioDataSource.groupSelectionTableView = _audioGroupSelectionTableView;
_audioDataSource.songsTableView = _audioSongTableView;
_audioDataSource.collectionView = _audioLibraryCollectionView;
_audioDataSource.gridModeListTableView = _audioLibraryGridModeSplitViewListTableView;
_audioDataSource.gridModeListSelectionCollectionView = _audioLibraryGridModeSplitViewListSelectionCollectionView;
[_audioDataSource setup];
_audioGroupDataSource = [[VLCLibraryAudioGroupDataSource alloc] init];
_audioGroupDataSource.tableViews = @[_audioGroupSelectionTableView];
_audioGroupDataSource.collectionViews = @[_audioLibraryGridModeSplitViewListSelectionCollectionView];
_audioDataSource.audioGroupDataSource = _audioGroupDataSource;
}
......@@ -203,7 +204,14 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
audioLibraryGridModeListSelectionCollectionViewLayout.minimumLineSpacing = collectionItemSpacing;
audioLibraryGridModeListSelectionCollectionViewLayout.minimumInteritemSpacing = collectionItemSpacing;
audioLibraryGridModeListSelectionCollectionViewLayout.sectionInset = collectionViewSectionInset;
audioLibraryGridModeListSelectionCollectionViewLayout.headerReferenceSize = VLCLibraryAudioGroupHeaderView.defaultHeaderSize;
if (@available(macOS 10.12, *)) {
audioLibraryGridModeListSelectionCollectionViewLayout.sectionHeadersPinToVisibleBounds = YES;
}
[VLCLibraryAudioDataSource setupCollectionView:_audioLibraryGridModeSplitViewListSelectionCollectionView];
[VLCLibraryAudioGroupDataSource setupCollectionView:_audioLibraryGridModeSplitViewListSelectionCollectionView];
}
- (void)setupAudioPlaceholderView
......
......@@ -46,6 +46,8 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAudioGrou
- (void)awakeFromNib
{
_audioGroupAlbumsDataSource = [[VLCLibraryAudioGroupDataSource alloc] init];
_audioGroupAlbumsDataSource.tableViews = @[_audioGroupAlbumsTableView];
_audioGroupAlbumsTableViewDelegate = [[VLCLibraryAudioGroupTableViewDelegate alloc] init];
_audioGroupAlbumsTableView.dataSource = _audioGroupAlbumsDataSource;
......@@ -97,14 +99,7 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAudioGrou
}
_audioGroupNameTextField.stringValue = _representedAudioGroup.displayString;
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
self->_audioGroupAlbumsDataSource.representedListOfAlbums = self->_representedAudioGroup.albums;
dispatch_async(dispatch_get_main_queue(), ^{
[self->_audioGroupAlbumsTableView reloadData];
});
});
_audioGroupAlbumsDataSource.representedAudioGroup = _representedAudioGroup;
}
@end
......@@ -297,6 +297,12 @@ viewForSupplementaryElementOfKind:(NSCollectionViewSupplementaryElementKind)kind
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtIndexPath:(NSIndexPath *)indexPath
forCollectionView:(NSCollectionView *)collectionView
{
const NSUInteger indexPathItem = indexPath.item;
if (indexPathItem < 0 || indexPathItem >= self.collectionArray.count) {
return nil;
}
return self.collectionArray[indexPath.item];
}
......