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
403 results
Show changes
Commits on Source (20)
Showing
with 392 additions and 63 deletions
......@@ -80,6 +80,7 @@
5325C57D29302E6800B2B63A /* VLCLibraryAudioViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5325C57B29302E6800B2B63A /* VLCLibraryAudioViewController.m */; };
534E8E3A29A06325009503F8 /* VLCMainVideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */; };
5352B37329DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 5352B37229DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m */; };
5352B37629E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */; };
5362550D293FD639005D64FA /* VLCLibraryWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5362550C293FD639005D64FA /* VLCLibraryWindowController.m */; };
536283F0291146BC00640C15 /* VLCLibraryTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283DE291146BC00640C15 /* VLCLibraryTableView.m */; };
536283F1291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283DF291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.m */; };
......@@ -261,6 +262,8 @@
534E8E3929A06325009503F8 /* VLCMainVideoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainVideoViewController.m; sourceTree = "<group>"; };
5352B37129DF29BF0011CE03 /* VLCMainVideoViewControlsBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainVideoViewControlsBar.h; sourceTree = "<group>"; };
5352B37229DF29BF0011CE03 /* VLCMainVideoViewControlsBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainVideoViewControlsBar.m; sourceTree = "<group>"; };
5352B37429E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryWindowPersistentPreferences.h; sourceTree = "<group>"; };
5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryWindowPersistentPreferences.m; sourceTree = "<group>"; };
5362550B293FD639005D64FA /* VLCLibraryWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryWindowController.h; sourceTree = "<group>"; };
5362550C293FD639005D64FA /* VLCLibraryWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryWindowController.m; sourceTree = "<group>"; };
536283DC291146BC00640C15 /* VLCLibraryAlbumTracksDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAlbumTracksDataSource.h; sourceTree = "<group>"; };
......@@ -1209,6 +1212,8 @@
7D713D312201AE350042BEB7 /* VLCLibraryWindow.m */,
5362550B293FD639005D64FA /* VLCLibraryWindowController.h */,
5362550C293FD639005D64FA /* VLCLibraryWindowController.m */,
5352B37429E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.h */,
5352B37529E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m */,
5317FE02294E3DD3001702F0 /* VLCLibraryCollectionViewDelegate.h */,
5317FE03294E3DD3001702F0 /* VLCLibraryCollectionViewDelegate.m */,
5317FE05294E8D1A001702F0 /* VLCLibraryCollectionViewDataSource.h */,
......@@ -1988,6 +1993,7 @@
7DD2F5C52081B73B007EE187 /* VLCRemoteControlService.m in Sources */,
1C31139F1E508C6900D4DD76 /* VLCMainWindowControlsBar.m in Sources */,
1C3113A11E508C6900D4DD76 /* VLCConvertAndSaveWindowController.m in Sources */,
5352B37629E149AC0011CE03 /* VLCLibraryWindowPersistentPreferences.m in Sources */,
7DBB7639227F3FBC002649E1 /* VLCLibraryCollectionViewSupplementaryElementView.m in Sources */,
1C3113A31E508C6900D4DD76 /* VLCCoreDialogProvider.m in Sources */,
6B2EFC631F281A0900F3C0EA /* VLCVolumeSliderCell.m in Sources */,
......
......@@ -135,6 +135,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCLibraryWindow.m \
gui/macosx/library/VLCLibraryWindowController.h \
gui/macosx/library/VLCLibraryWindowController.m \
gui/macosx/library/VLCLibraryWindowPersistentPreferences.h \
gui/macosx/library/VLCLibraryWindowPersistentPreferences.m \
gui/macosx/library/video-library/VLCLibraryVideoViewController.h \
gui/macosx/library/video-library/VLCLibraryVideoViewController.m \
gui/macosx/library/video-library/VLCLibraryVideoCollectionViewsStackViewController.h \
......
......@@ -670,6 +670,9 @@
<action selector="segmentedControlAction:" target="QvC-M9-y7g" id="seg-Me-t1n"/>
</connections>
</segmentedControl>
<connections>
<action selector="segmentedTitleControlAction:" target="QvC-M9-y7g" id="YUg-2w-bwP"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="89f-AL-zuU"/>
<toolbarItem implicitItemIdentifier="85037E27-D263-490C-B4B2-0EFE5B5837AA" label="Library View Type" paletteLabel="Library View Type" sizingBehavior="auto" id="kBa-MC-Mdq">
......@@ -685,6 +688,9 @@
</segments>
</segmentedCell>
</segmentedControl>
<connections>
<action selector="gridVsListSegmentedControlAction:" target="QvC-M9-y7g" id="HMA-eG-oej"/>
</connections>
</toolbarItem>
<searchToolbarItem implicitItemIdentifier="A132890F-6B3D-4523-A71B-B00F095057C4" label="Search" paletteLabel="Search" visibilityPriority="1001" id="dv4-Il-y8X">
<nil key="toolTip"/>
......
......@@ -45,9 +45,11 @@ typedef NS_ENUM(NSUInteger, VLCLibrarySegment) {
VLCLibraryStreamsSegment
};
typedef NS_ENUM(NSUInteger, VLCViewModeSegment) {
VLCGridViewModeSegment = 0,
VLCListViewModeSegment
typedef NS_ENUM(NSInteger, VLCLibraryViewModeSegment) {
VLCLibrarySmallestSentinelViewModeSegment = -1,
VLCLibraryGridViewModeSegment,
VLCLibraryListViewModeSegment,
VLCLibraryLargestSentinelViewModeSegment
};
@interface VLCLibraryWindow : VLCFullVideoViewWindow<NSUserInterfaceItemIdentification>
......@@ -145,6 +147,7 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
- (void)togglePlaylist;
- (void)hideControlsBar;
- (void)showControlsBar;
- (void)updateGridVsListViewModeSegmentedControl;
- (IBAction)playlistDoubleClickAction:(id)sender;
- (IBAction)shuffleAction:(id)sender;
......@@ -157,7 +160,9 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
- (IBAction)showAndHidePlaylist:(id)sender;
- (IBAction)backwardsNavigationAction:(id)sender;
- (IBAction)forwardsNavigationAction:(id)sender;
- (IBAction)segmentedControlAction:(id)sender;
- (IBAction)segmentedTitleControlAction:(id)sender;
- (IBAction)gridVsListSegmentedControlAction:(id)sender;
@end
NS_ASSUME_NONNULL_END
......@@ -21,7 +21,9 @@
*****************************************************************************/
#import "VLCLibraryWindow.h"
#include "VLCLibraryDataTypes.h"
#import "VLCLibraryDataTypes.h"
#import "extensions/NSString+Helpers.h"
#import "extensions/NSFont+VLCAdditions.h"
#import "extensions/NSColor+VLCAdditions.h"
......@@ -40,6 +42,7 @@
#import "library/VLCLibrarySortingMenuController.h"
#import "library/VLCLibraryNavigationStack.h"
#import "library/VLCLibraryUIUnits.h"
#import "library/VLCLibraryWindowPersistentPreferences.h"
#import "library/video-library/VLCLibraryVideoCollectionViewsStackViewController.h"
#import "library/video-library/VLCLibraryVideoTableViewDataSource.h"
......@@ -47,6 +50,7 @@
#import "library/audio-library/VLCLibraryAlbumTableCellView.h"
#import "library/audio-library/VLCLibraryAudioViewController.h"
#import "library/audio-library/VLCLibraryAudioDataSource.h"
#import "media-source/VLCMediaSourceBaseDataSource.h"
#import "media-source/VLCLibraryMediaSourceViewController.h"
......@@ -268,7 +272,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
{
[super encodeRestorableStateWithCoder:coder];
[coder encodeInteger:_segmentedTitleControl.selectedSegment forKey:@"macosx-library-selected-segment"];
[coder encodeInteger:_gridVsListSegmentedControl.selectedSegment forKey:@"macosx-library-view-mode-selected-segment"];
[coder encodeInteger:_audioSegmentedControl.selectedSegment forKey:@"macosx-library-audio-view-selected-segment"];
}
......@@ -372,13 +375,52 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
#pragma mark - misc. user interactions
- (void)setViewForSelectedSegment
- (void)updateGridVsListViewModeSegmentedControl
{
_currentSelectedSegment = _segmentedTitleControl.selectedSegment;
_currentSelectedViewModeSegment = _gridVsListSegmentedControl.selectedSegment;
const VLCLibrarySegment selectedLibrarySegment = _segmentedTitleControl.selectedSegment;
VLCLibraryWindowPersistentPreferences * const preferences = VLCLibraryWindowPersistentPreferences.sharedInstance;
VLCLibrarySegment selectedLibrarySegment = _segmentedTitleControl.selectedSegment;
switch (selectedLibrarySegment) {
case VLCLibraryVideoSegment:
_currentSelectedViewModeSegment = preferences.videoLibraryViewMode;
break;
case VLCLibraryMusicSegment:
{
const VLCAudioLibrarySegment selectedAudioSegment = _audioSegmentedControl.selectedSegment;
switch (selectedAudioSegment) {
case VLCAudioLibraryArtistsSegment:
_currentSelectedViewModeSegment = preferences.artistLibraryViewMode;
break;
case VLCAudioLibraryGenresSegment:
_currentSelectedViewModeSegment = preferences.genreLibraryViewMode;
break;
case VLCAudioLibraryAlbumsSegment:
_currentSelectedViewModeSegment = preferences.albumLibraryViewMode;
break;
case VLCAudioLibrarySongsSegment:
_currentSelectedViewModeSegment = preferences.songsLibraryViewMode;
break;
default:
break;
}
break;
}
case VLCLibraryBrowseSegment:
_currentSelectedViewModeSegment = preferences.browseLibraryViewMode;
break;
case VLCLibraryStreamsSegment:
_currentSelectedViewModeSegment = preferences.streamLibraryViewMode;
break;
default:
break;
}
_gridVsListSegmentedControl.selectedSegment = _currentSelectedViewModeSegment;
}
- (void)setViewForSelectedSegment
{
switch (_currentSelectedSegment) {
case VLCLibraryVideoSegment:
[self showVideoLibrary];
break;
......@@ -387,22 +429,73 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
break;
case VLCLibraryBrowseSegment:
case VLCLibraryStreamsSegment:
[self showMediaSourceLibraryWithSegment:selectedLibrarySegment];
[self showMediaSourceLibraryWithSegment:_currentSelectedSegment];
break;
default:
break;
}
[self invalidateRestorableState];
}
- (IBAction)segmentedControlAction:(id)sender
- (IBAction)segmentedTitleControlAction:(id)sender
{
if (_segmentedTitleControl.selectedSegment == _currentSelectedSegment &&
_gridVsListSegmentedControl.selectedSegment == _currentSelectedViewModeSegment) {
if (_segmentedTitleControl.selectedSegment == _currentSelectedSegment) {
return;
}
_currentSelectedSegment = _segmentedTitleControl.selectedSegment;
[self setViewForSelectedSegment];
[self updateGridVsListViewModeSegmentedControl];
}
- (IBAction)gridVsListSegmentedControlAction:(id)sender
{
if (_gridVsListSegmentedControl.selectedSegment == _currentSelectedViewModeSegment) {
return;
}
_currentSelectedViewModeSegment = _gridVsListSegmentedControl.selectedSegment;
const VLCLibrarySegment selectedLibrarySegment = _segmentedTitleControl.selectedSegment;
VLCLibraryWindowPersistentPreferences * const preferences = VLCLibraryWindowPersistentPreferences.sharedInstance;
switch (selectedLibrarySegment) {
case VLCLibraryVideoSegment:
preferences.videoLibraryViewMode = _currentSelectedViewModeSegment;
break;
case VLCLibraryMusicSegment:
{
const VLCAudioLibrarySegment selectedAudioSegment = _audioSegmentedControl.selectedSegment;
switch (selectedAudioSegment) {
case VLCAudioLibraryArtistsSegment:
preferences.artistLibraryViewMode = _currentSelectedViewModeSegment;
break;
case VLCAudioLibraryGenresSegment:
preferences.genreLibraryViewMode = _currentSelectedViewModeSegment;
break;
case VLCAudioLibraryAlbumsSegment:
preferences.albumLibraryViewMode = _currentSelectedViewModeSegment;
break;
case VLCAudioLibrarySongsSegment:
preferences.songsLibraryViewMode = _currentSelectedViewModeSegment;
break;
default:
break;
}
break;
}
case VLCLibraryBrowseSegment:
preferences.browseLibraryViewMode = _currentSelectedViewModeSegment;
break;
case VLCLibraryStreamsSegment:
preferences.streamLibraryViewMode = _currentSelectedViewModeSegment;
break;
default:
break;
}
[self setViewForSelectedSegment];
[self invalidateRestorableState];
}
- (void)hideToolbarItem:(NSToolbarItem *)toolbarItem
......@@ -500,9 +593,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[self setLibrarySearchToolbarItemVisible:YES];
_optionBarView.hidden = YES;
_gridVsListSegmentedControl.target = self;
_gridVsListSegmentedControl.action = @selector(segmentedControlAction:);
[_libraryVideoViewController presentVideoView];
}
......@@ -513,9 +603,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[self setLibrarySearchToolbarItemVisible:YES];
_optionBarView.hidden = NO;
_gridVsListSegmentedControl.target = self;
_gridVsListSegmentedControl.action = @selector(segmentedControlAction:);
[_libraryAudioViewController presentAudioView];
}
......@@ -614,7 +701,7 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
- (IBAction)goToBrowseSection:(id)sender
{
[_segmentedTitleControl setSelected:YES forSegment:2];
[self segmentedControlAction:_segmentedTitleControl];
[self segmentedTitleControlAction:_segmentedTitleControl];
}
#pragma mark - split view delegation
......
......@@ -68,14 +68,12 @@
VLCLibraryWindow *libraryWindow = [VLCMain sharedInstance].libraryWindow;
NSInteger rememberedSelectedLibrarySegment = [state decodeIntegerForKey:@"macosx-library-selected-segment"];
NSInteger rememberedSelectedLibraryViewModeSegment = [state decodeIntegerForKey:@"macosx-library-view-mode-selected-segment"];
NSInteger rememberedSelectedLibraryViewAudioSegment = [state decodeIntegerForKey:@"macosx-library-audio-view-selected-segment"];
[libraryWindow.segmentedTitleControl setSelectedSegment:rememberedSelectedLibrarySegment];
[libraryWindow.gridVsListSegmentedControl setSelectedSegment:rememberedSelectedLibraryViewModeSegment];
[libraryWindow.audioSegmentedControl setSelectedSegment:rememberedSelectedLibraryViewAudioSegment];
[libraryWindow segmentedControlAction:self];
[libraryWindow segmentedTitleControlAction:self];
if (rememberedSelectedLibrarySegment == VLCLibraryMusicSegment) {
[libraryWindow.libraryAudioViewController segmentedControlAction:self];
}
......
/*****************************************************************************
* VLCLibraryWindowPersistentPreferences.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>
#import "VLCLibraryWindow.h"
NS_ASSUME_NONNULL_BEGIN
@interface VLCLibraryWindowPersistentPreferences : NSObject
+ (VLCLibraryWindowPersistentPreferences *)sharedInstance;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment videoLibraryViewMode;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment albumLibraryViewMode;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment genreLibraryViewMode;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment songsLibraryViewMode;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment artistLibraryViewMode;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment browseLibraryViewMode;
@property (readwrite, nonatomic) VLCLibraryViewModeSegment streamLibraryViewMode;
@end
NS_ASSUME_NONNULL_END
/*****************************************************************************
* VLCLibraryWindowPersistentPreferences.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 "VLCLibraryWindowPersistentPreferences.h"
NSString * const VLCLibraryWindowPreferencePrefix = @"VLCLibraryWindow";
NSString * const VLCLibraryVideoLibraryViewModePreferenceKey = @"VideoLibraryViewMode";
NSString * const VLCLibraryAlbumLibraryViewModePreferenceKey = @"AlbumLibraryViewMode";
NSString * const VLCLibraryGenreLibraryViewModePreferenceKey = @"GenreLibraryViewMode";
NSString * const VLCLibrarySongsLibraryViewModePreferenceKey = @"SongsLibraryViewMode";
NSString * const VLCLibraryArtistLibraryViewModePreferenceKey = @"ArtistLibraryViewMode";
NSString * const VLCLibraryBrowseLibraryViewModePreferenceKey = @"BrowseLibraryViewMode";
NSString * const VLCLibraryStreamLibraryViewModePreferenceKey = @"StreamLibraryViewMode";
@implementation VLCLibraryWindowPersistentPreferences
static VLCLibraryWindowPersistentPreferences *sharedInstance = nil;
+ (VLCLibraryWindowPersistentPreferences *)sharedInstance
{
static dispatch_once_t pred;
dispatch_once(&pred, ^{
sharedInstance = [[VLCLibraryWindowPersistentPreferences alloc] init];
});
return sharedInstance;
}
- (NSString * const)fullLibraryWindowKey:(NSString *)partialKey
{
return [NSString stringWithFormat:@"%@.%@", VLCLibraryWindowPreferencePrefix, partialKey];
}
- (const NSInteger)libraryViewModePreferenceWithKey:(NSString *)key
{
NSUserDefaults * const standardUserDefaults = NSUserDefaults.standardUserDefaults;
NSString * const fullKey = [self fullLibraryWindowKey:key];
NSInteger viewModeValue = [standardUserDefaults integerForKey:fullKey];
if (viewModeValue <= VLCLibrarySmallestSentinelViewModeSegment ||
viewModeValue >= VLCLibraryLargestSentinelViewModeSegment) {
NSLog(@"WARNING: Retrieved invalid values for library view mode. Resorting to default.");
viewModeValue = VLCLibraryGridViewModeSegment; // Set to workable default
}
return viewModeValue;
}
- (void)setLibraryWindowViewModePreferenceWithKey:(NSString *)key
value:(VLCLibraryViewModeSegment)viewMode
{
NSParameterAssert(viewMode > VLCLibrarySmallestSentinelViewModeSegment &&
viewMode < VLCLibraryLargestSentinelViewModeSegment);
NSUserDefaults * const standardUserDefaults = NSUserDefaults.standardUserDefaults;
NSString * const fullKey = [self fullLibraryWindowKey:key];
[standardUserDefaults setInteger:viewMode forKey:fullKey];
}
- (VLCLibraryViewModeSegment)videoLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibraryVideoLibraryViewModePreferenceKey];
}
- (void)setVideoLibraryViewMode:(VLCLibraryViewModeSegment)videoLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibraryVideoLibraryViewModePreferenceKey
value:videoLibraryViewMode];
}
- (VLCLibraryViewModeSegment)albumLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibraryAlbumLibraryViewModePreferenceKey];
}
- (void)setAlbumLibraryViewMode:(VLCLibraryViewModeSegment)albumLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibraryAlbumLibraryViewModePreferenceKey
value:albumLibraryViewMode];
}
- (VLCLibraryViewModeSegment)genreLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibraryGenreLibraryViewModePreferenceKey];
}
- (void)setGenreLibraryViewMode:(VLCLibraryViewModeSegment)genreLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibraryGenreLibraryViewModePreferenceKey
value:genreLibraryViewMode];
}
- (VLCLibraryViewModeSegment)songsLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibrarySongsLibraryViewModePreferenceKey];
}
- (void)setSongsLibraryViewMode:(VLCLibraryViewModeSegment)songsLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibrarySongsLibraryViewModePreferenceKey
value:songsLibraryViewMode];
}
- (VLCLibraryViewModeSegment)artistLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibraryArtistLibraryViewModePreferenceKey];
}
- (void)setArtistLibraryViewMode:(VLCLibraryViewModeSegment)artistLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibraryArtistLibraryViewModePreferenceKey
value:artistLibraryViewMode];
}
- (VLCLibraryViewModeSegment)browseLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibraryBrowseLibraryViewModePreferenceKey];
}
- (void)setBrowseLibraryViewMode:(VLCLibraryViewModeSegment)browseLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibraryBrowseLibraryViewModePreferenceKey
value:browseLibraryViewMode];
}
- (VLCLibraryViewModeSegment)streamLibraryViewMode
{
return [self libraryViewModePreferenceWithKey:VLCLibraryStreamLibraryViewModePreferenceKey];
}
- (void)setStreamLibraryViewMode:(VLCLibraryViewModeSegment)streamLibraryViewMode
{
[self setLibraryWindowViewModePreferenceWithKey:VLCLibraryStreamLibraryViewModePreferenceKey
value:streamLibraryViewMode];
}
@end
......@@ -48,7 +48,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) NSScrollView *audioLibraryGridModeSplitViewListSelectionCollectionViewScrollView;
@property (readonly) NSCollectionView *audioLibraryGridModeSplitViewListSelectionCollectionView;
@property (readonly) NSSegmentedControl *audioSegmentedControl;
@property (readonly) NSSegmentedControl *gridVsListSegmentedControl;
@property (readonly) NSSegmentedControl *segmentedTitleControl;
@property (readonly) NSImageView *placeholderImageView;
@property (readonly) NSTextField *placeholderLabel;
......
......@@ -30,6 +30,7 @@
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryNavigationStack.h"
#import "library/VLCLibraryWindow.h"
#import "library/VLCLibraryWindowPersistentPreferences.h"
#import "library/audio-library/VLCLibraryAlbumTableCellView.h"
#import "library/audio-library/VLCLibraryAudioDataSource.h"
......@@ -116,7 +117,6 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
_audioLibraryGridModeSplitViewListSelectionCollectionView = libraryWindow.audioLibraryGridModeSplitViewListSelectionCollectionView;
_audioSegmentedControl = libraryWindow.audioSegmentedControl;
_gridVsListSegmentedControl = libraryWindow.gridVsListSegmentedControl;
_segmentedTitleControl = libraryWindow.segmentedTitleControl;
_placeholderImageView = libraryWindow.placeholderImageView;
_placeholderLabel = libraryWindow.placeholderLabel;
......@@ -355,7 +355,8 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
- (void)updatePresentedView
{
_audioDataSource.audioLibrarySegment = _audioSegmentedControl.selectedSegment;
const VLCAudioLibrarySegment audioLibrarySegment = _audioSegmentedControl.selectedSegment;
_audioDataSource.audioLibrarySegment = audioLibrarySegment;
if (_audioDataSource.libraryModel.listOfAudioMedia.count == 0) {
[self presentPlaceholderAudioView];
......@@ -363,11 +364,35 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
[self prepareAudioLibraryView];
[self hideAllViews];
if (self.gridVsListSegmentedControl.selectedSegment == VLCListViewModeSegment) {
VLCLibraryViewModeSegment viewModeSegment = VLCLibraryGridViewModeSegment; // default value
VLCLibraryWindowPersistentPreferences * const libraryWindowPrefs = VLCLibraryWindowPersistentPreferences.sharedInstance;
switch (audioLibrarySegment) {
case VLCAudioLibraryArtistsSegment:
viewModeSegment = libraryWindowPrefs.artistLibraryViewMode;
break;
case VLCAudioLibraryGenresSegment:
viewModeSegment = libraryWindowPrefs.genreLibraryViewMode;
break;
case VLCAudioLibrarySongsSegment:
viewModeSegment = libraryWindowPrefs.songsLibraryViewMode;
break;
case VLCAudioLibraryAlbumsSegment:
viewModeSegment = libraryWindowPrefs.albumLibraryViewMode;
break;
default:
break;
}
if (viewModeSegment == VLCLibraryListViewModeSegment) {
[self presentAudioTableView];
} else if (self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment) {
} else if (viewModeSegment == VLCLibraryGridViewModeSegment) {
[self presentAudioGridModeView];
} else {
NSAssert(false, @"View mode must be grid or list mode");
}
[VLCMain.sharedInstance.libraryWindow updateGridVsListViewModeSegmentedControl];
}
}
......
......@@ -68,7 +68,6 @@
_baseDataSource.collectionViewScrollView = _collectionViewScrollView;
_baseDataSource.homeButton = _homeButton;
_baseDataSource.pathControl = _pathControl;
_baseDataSource.gridVsListSegmentedControl = _gridVsListSegmentedControl;
_baseDataSource.tableView = _tableView;
[_baseDataSource setupViews];
}
......
......@@ -41,7 +41,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite) NSCollectionView *collectionView;
@property (readwrite) NSScrollView *collectionViewScrollView;
@property (readwrite) NSTableView *tableView;
@property (readwrite) NSSegmentedControl *gridVsListSegmentedControl;
@property (readwrite) NSButton *homeButton;
@property (readwrite) VLCInputNodePathControl *pathControl;
@property (readwrite, nonatomic) VLCMediaSourceMode mediaSourceMode;
......@@ -51,7 +50,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)reloadViews;
- (void)homeButtonAction:(id)sender;
- (void)pathControlAction:(id)sender;
- (void)setGridOrListMode:(id)sender;
@end
......
......@@ -38,6 +38,7 @@
#import "library/VLCLibraryCollectionViewSupplementaryElementView.h"
#import "library/VLCLibraryTableCellView.h"
#import "library/VLCLibraryUIUnits.h"
#import "library/VLCLibraryWindowPersistentPreferences.h"
#import "main/VLCMain.h"
......@@ -114,11 +115,31 @@ NSString *VLCMediaSourceTableViewCellIdentifier = @"VLCMediaSourceTableViewCellI
- (void)reloadViews
{
self.gridVsListSegmentedControl.action = @selector(setGridOrListMode:);
self.gridVsListSegmentedControl.target = self;
_gridViewMode = self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment;
VLCLibraryViewModeSegment viewModeSegment = VLCLibraryGridViewModeSegment;
VLCLibraryWindowPersistentPreferences * const libraryWindowPrefs = VLCLibraryWindowPersistentPreferences.sharedInstance;
switch (_mediaSourceMode) {
case VLCMediaSourceModeLAN:
viewModeSegment = libraryWindowPrefs.browseLibraryViewMode;
break;
case VLCMediaSourceModeInternet:
viewModeSegment = libraryWindowPrefs.streamLibraryViewMode;
break;
default:
break;
}
[self setCurrentViewMode];
if (viewModeSegment == VLCLibraryGridViewModeSegment) {
self.collectionViewScrollView.hidden = NO;
self.tableView.hidden = YES;
[self.collectionView reloadData];
} else if (viewModeSegment == VLCLibraryListViewModeSegment) {
self.collectionViewScrollView.hidden = YES;
self.tableView.hidden = NO;
[self.tableView reloadData];
} else {
NSAssert(false, @"View mode must be grid or list mode");
}
}
- (void)loadMediaSources
......@@ -464,27 +485,6 @@ referenceSizeForHeaderInSection:(NSInteger)section
}
}
- (void)setCurrentViewMode
{
if (_gridViewMode) {
self.collectionViewScrollView.hidden = NO;
self.tableView.hidden = YES;
[self.collectionView reloadData];
} else {
self.collectionViewScrollView.hidden = YES;
self.tableView.hidden = NO;
[self.tableView reloadData];
}
}
- (void)setGridOrListMode:(id)sender
{
_gridViewMode = self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment;
_childDataSource.gridViewMode = _gridViewMode;
[self setCurrentViewMode];
}
#pragma mark - VLCMediaSource Delegation
- (void)mediaSourceChildrenReset:(NSNotification *)aNotification
......
......@@ -40,7 +40,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, assign) NSCollectionView *collectionView;
@property (readwrite, assign) NSTableView *tableView;
@property (readwrite) VLCInputNodePathControl *pathControl;
@property (readwrite) BOOL gridViewMode;
- (void)setupViews;
- (VLCInputItem*)mediaSourceInputItemAtRow:(NSInteger)tableViewRow;
......
......@@ -42,7 +42,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) NSTableView *videoLibraryGroupSelectionTableView;
@property (readonly) NSScrollView *videoLibraryGroupsTableViewScrollView;
@property (readonly) NSTableView *videoLibraryGroupsTableView;
@property (readonly) NSSegmentedControl *gridVsListSegmentedControl;
@property (readonly) NSSegmentedControl *segmentedTitleControl;
@property (readonly) NSImageView *placeholderImageView;
@property (readonly) NSTextField *placeholderLabel;
......
......@@ -28,6 +28,7 @@
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryUIUnits.h"
#import "library/VLCLibraryWindow.h"
#import "library/VLCLibraryWindowPersistentPreferences.h"
#import "library/audio-library/VLCLibraryAudioViewController.h"
......@@ -90,7 +91,6 @@
_videoLibraryGroupsTableViewScrollView = libraryWindow.videoLibraryGroupsTableViewScrollView;
_videoLibraryGroupsTableView = libraryWindow.videoLibraryGroupsTableView;
_gridVsListSegmentedControl = libraryWindow.gridVsListSegmentedControl;
_segmentedTitleControl = libraryWindow.segmentedTitleControl;
_placeholderImageView = libraryWindow.placeholderImageView;
_placeholderLabel = libraryWindow.placeholderLabel;
......@@ -208,14 +208,18 @@
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_videoLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_videoLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
if (self.gridVsListSegmentedControl.selectedSegment == VLCGridViewModeSegment) {
const VLCLibraryViewModeSegment viewModeSegment = VLCLibraryWindowPersistentPreferences.sharedInstance.videoLibraryViewMode;
if (viewModeSegment == VLCLibraryGridViewModeSegment) {
_videoLibrarySplitView.hidden = YES;
_videoLibraryCollectionViewsStackViewScrollView.hidden = NO;
[_libraryVideoCollectionViewsStackViewController reloadData];
} else {
} else if (viewModeSegment == VLCLibraryListViewModeSegment) {
_videoLibrarySplitView.hidden = NO;
_videoLibraryCollectionViewsStackViewScrollView.hidden = YES;
[_libraryVideoTableViewDataSource reloadData];
} else {
NSAssert(false, @"View mode must be grid or list mode");
}
}
......