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)
......@@ -391,6 +391,9 @@
<action selector="rendererControlAction:" target="QvC-M9-y7g" id="M1O-u2-5FO"/>
</connections>
</button>
<connections>
<action selector="rendererControlAction:" target="xXj-E8-b8X" id="k28-mg-4Hy"/>
</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">
......@@ -480,6 +483,9 @@
<searchToolbarItem reference="dv4-Il-y8X"/>
<toolbarItem reference="Lf2-ec-tHh"/>
</defaultToolbarItems>
<connections>
<outlet property="delegate" destination="xXj-E8-b8X" id="I0j-5P-oSw"/>
</connections>
</toolbar>
<connections>
<outlet property="audioCollectionSelectionTableView" destination="LNt-ot-2wU" id="aim-ER-CpD"/>
......@@ -498,21 +504,16 @@
<outlet property="audioLibrarySplitView" destination="llh-BF-BEJ" id="gvt-K1-cGw"/>
<outlet property="audioLibraryView" destination="lpg-UW-pTq" id="FYD-PV-Ce2"/>
<outlet property="backwardsNavigationButton" destination="Bzq-ZV-i8j" id="Bac-Kb-ut"/>
<outlet property="backwardsToolbarItem" destination="6Ie-eu-GDn" id="q3s-rt-8gy"/>
<outlet property="controlsBar" destination="Uzf-Tf-H8x" id="n0G-92-F2Q"/>
<outlet property="controlsBarHeightConstraint" destination="Fps-hR-AFq" id="E4g-JQ-fgx"/>
<outlet property="emptyLibraryView" destination="YJf-1r-vaC" id="AJB-eN-4u6"/>
<outlet property="flexibleSpaceToolbarItem" destination="89f-AL-zuU" id="3p9-t8-79g"/>
<outlet property="forwardsNavigationButton" destination="jzy-je-h2k" id="for-Wa-rd"/>
<outlet property="forwardsToolbarItem" destination="g2e-7o-Qet" id="3qp-rg-t2P"/>
<outlet property="gridVsListSegmentedControl" destination="lIg-5J-C5F" id="u6B-Zx-4mX"/>
<outlet property="homeLibraryStackView" destination="p8n-RC-fWF" id="jcF-ny-9D7"/>
<outlet property="homeLibraryStackViewScrollView" destination="HXH-MZ-tkf" id="fzR-fb-nyS"/>
<outlet property="homeLibraryView" destination="mMj-Qb-bS1" id="WeM-ZY-knV"/>
<outlet property="librarySearchField" destination="ab6-kR-8Io" id="Qf7-UM-lol"/>
<outlet property="librarySearchToolbarItem" destination="dv4-Il-y8X" id="Um3-s4-Ax4"/>
<outlet property="librarySortButton" destination="Rja-6g-wNZ" id="FQ7-MU-hsk"/>
<outlet property="libraryViewModeToolbarItem" destination="kBa-MC-Mdq" id="q39-28-tyf"/>
<outlet property="mainSplitView" destination="u8g-jy-S4e" id="lI5-wR-kef"/>
<outlet property="mediaSourceCollectionView" destination="r7v-GI-W1U" id="3JJ-GU-o5o"/>
<outlet property="mediaSourceCollectionViewScrollView" destination="cFG-c9-cI9" id="QQq-Ql-uQ7"/>
......@@ -530,13 +531,10 @@
<outlet property="placeholderLabel" destination="adK-Pc-tnU" id="6Zw-IF-czx"/>
<outlet property="playQueueToggle" destination="IaO-se-D0g" id="tqY-YM-KQC"/>
<outlet property="renderersButton" destination="ffS-QP-Om3" id="rOM-No-rd0"/>
<outlet property="renderersToolbarItem" destination="YEO-08-Qzi" id="mwx-8t-5o7"/>
<outlet property="sortOrderToolbarItem" destination="Tbc-Ik-FaO" id="098-yp-97f"/>
<outlet property="splitViewBottomConstraintToBottomBar" destination="QH8-mU-6ZP" id="b0t-C0-N5t"/>
<outlet property="splitViewBottomConstraintToSuperView" destination="DQQ-ji-YSy" id="b0t-C0-5uP"/>
<outlet property="splitViewController" destination="Kkr-kI-gpb" id="9aZ-xw-zrl"/>
<outlet property="toggleNavSidebarToolbarItem" destination="5oK-0W-JJh" id="To1-7k-AJF"/>
<outlet property="togglePlaylistToolbarItem" destination="Lf2-ec-tHh" id="gtf-cd-765"/>
<outlet property="toolbarDelegate" destination="xXj-E8-b8X" id="VsJ-ky-NJg"/>
<outlet property="videoLibraryCollectionView" destination="neh-e5-MUa" id="bmc-HF-k9s"/>
<outlet property="videoLibraryCollectionViewScrollView" destination="9bN-bM-RVu" id="iLf-ff-boW"/>
<outlet property="videoLibraryGroupSelectionTableView" destination="8M4-Y1-r6Z" id="5e1-v1-eW3"/>
......@@ -1519,6 +1517,21 @@
</constraints>
<point key="canvasLocation" x="58" y="-261"/>
</customView>
<customObject id="xXj-E8-b8X" customClass="VLCLibraryWindowToolbarDelegate">
<connections>
<outlet property="backwardsToolbarItem" destination="6Ie-eu-GDn" id="nqO-Tg-a1S"/>
<outlet property="flexibleSpaceToolbarItem" destination="89f-AL-zuU" id="rza-T3-EQq"/>
<outlet property="forwardsToolbarItem" destination="g2e-7o-Qet" id="4ex-8c-aSO"/>
<outlet property="librarySearchToolbarItem" destination="dv4-Il-y8X" id="iip-l7-TuF"/>
<outlet property="libraryViewModeToolbarItem" destination="kBa-MC-Mdq" id="e5b-Hd-Qha"/>
<outlet property="libraryWindow" destination="QvC-M9-y7g" id="YT5-2G-VJ2"/>
<outlet property="renderersToolbarItem" destination="YEO-08-Qzi" id="pXm-Aj-4Qg"/>
<outlet property="sortOrderToolbarItem" destination="Tbc-Ik-FaO" id="MFb-EI-Dsa"/>
<outlet property="toggleNavSidebarToolbarItem" destination="5oK-0W-JJh" id="xoK-Zo-nwh"/>
<outlet property="togglePlaylistToolbarItem" destination="Lf2-ec-tHh" id="PX9-gs-T5Z"/>
<outlet property="toolbar" destination="pr3-TD-J2z" id="0bl-3Z-WiA"/>
</connections>
</customObject>
<viewController id="Kkr-kI-gpb" customClass="VLCLibraryWindowSplitViewController">
<connections>
<outlet property="libraryWindow" destination="QvC-M9-y7g" id="wFD-Rc-i8w"/>
......
......@@ -218,7 +218,7 @@
+ (const CGFloat)libraryWindowNavSidebarMaxWidth
{
return 200.;
return 300.;
}
+ (const CGFloat)libraryWindowPlaylistSidebarMaxWidth
......
......@@ -107,17 +107,7 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
@property (readwrite, weak) IBOutlet NSButton *backwardsNavigationButton;
@property (readwrite, weak) IBOutlet NSButton *forwardsNavigationButton;
@property (readwrite, weak) IBOutlet NSButton *artworkButton;
@property (readwrite, weak) IBOutlet NSToolbarItem *toggleNavSidebarToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *trackingSeparatorToolbarItem;
@property (readwrite, weak) IBOutlet NSButton *renderersButton;
@property (readwrite, weak) IBOutlet NSToolbarItem *backwardsToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *forwardsToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *libraryViewModeToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *sortOrderToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *flexibleSpaceToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *librarySearchToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *togglePlaylistToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *renderersToolbarItem;
@property (readwrite, weak) IBOutlet VLCLibraryWindowToolbarDelegate *toolbarDelegate;
@property (readwrite, weak) IBOutlet NSLayoutConstraint *splitViewBottomConstraintToBottomBar;
@property (nonatomic, readwrite, strong) IBOutlet NSView *emptyLibraryView;
......@@ -129,7 +119,6 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
@property (readwrite) BOOL nonembedded;
@property (readwrite, weak) IBOutlet VLCLibraryWindowSplitViewController *splitViewController;
@property (readonly) VLCLibraryWindowToolbarDelegate *toolbarDelegate;
@property (readwrite) VLCLibraryNavigationStack *navigationStack;
@property (readonly) VLCLibraryAudioViewController *libraryAudioViewController;
@property (readonly) VLCLibraryMediaSourceViewController *libraryMediaSourceViewController;
......@@ -143,6 +132,8 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
- (void)hideControlsBar;
- (void)showControlsBar;
- (void)updateGridVsListViewModeSegmentedControl;
- (void)updateFilterString;
- (void)clearFilterString;
- (void)presentLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
......@@ -152,7 +143,6 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
- (IBAction)backwardsNavigationAction:(id)sender;
- (IBAction)forwardsNavigationAction:(id)sender;
- (IBAction)gridVsListSegmentedControlAction:(id)sender;
- (IBAction)rendererControlAction:(id)sender;
@end
......
......@@ -63,8 +63,6 @@
#import "media-source/VLCMediaSourceBaseDataSource.h"
#import "media-source/VLCLibraryMediaSourceViewController.h"
#import "menus/renderers/VLCRendererMenuController.h"
#import "views/VLCBottomBarView.h"
#import "views/VLCCustomWindowButton.h"
#import "views/VLCDragDropView.h"
......@@ -147,21 +145,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
self.tabbingMode = NSWindowTabbingModeDisallowed;
}
_toolbarDelegate = [[VLCLibraryWindowToolbarDelegate alloc] initWithLibraryWindow:self];
self.toolbar.delegate = _toolbarDelegate;
self.toolbar.allowsUserCustomization = NO;
if (@available(macOS 11.0, *)) {
const NSInteger navSidebarToggleToolbarItemIndex = [self.toolbar.items indexOfObject:self.toggleNavSidebarToolbarItem];
NSAssert(navSidebarToggleToolbarItemIndex != NSNotFound, @"Could not find navigation sidebar toggle toolbar item!");
const NSInteger trackingSeparatorItemIndex = navSidebarToggleToolbarItemIndex + 1;
[self.toolbar insertItemWithItemIdentifier:VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier
atIndex:trackingSeparatorItemIndex];
self.trackingSeparatorToolbarItem = [self.toolbar.items objectAtIndex:trackingSeparatorItemIndex];
}
VLCMain *mainInstance = VLCMain.sharedInstance;
_playlistController = [mainInstance playlistController];
......@@ -179,14 +162,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
self.videoViewController.displayLibraryControls = YES;
[self hideControlsBarImmediately];
[self.gridVsListSegmentedControl setToolTip: _NS("Grid View or List View")];
[self.librarySortButton setToolTip: _NS("Select Sorting Mode")];
[self.playQueueToggle setToolTip: _NS("Toggle Playqueue")];
[self.gridVsListSegmentedControl setHidden:NO];
[self.librarySortButton setHidden:NO];
[self.librarySearchField setEnabled:YES];
NSNotificationCenter *notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(shouldShowController:)
......@@ -200,14 +175,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
selector:@selector(playerStateChanged:)
name:VLCPlayerStateChanged
object:nil];
[notificationCenter addObserver:self
selector:@selector(renderersChanged:)
name:VLCRendererAddedNotification
object:nil];
[notificationCenter addObserver:self
selector:@selector(renderersChanged:)
name:VLCRendererRemovedNotification
object:nil];
_libraryHomeViewController = [[VLCLibraryHomeViewController alloc] initWithLibraryWindow:self];
_libraryVideoViewController = [[VLCLibraryVideoViewController alloc] initWithLibraryWindow:self];
......@@ -215,13 +182,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
_libraryMediaSourceViewController = [[VLCLibraryMediaSourceViewController alloc] initWithLibraryWindow:self];
[self setViewForSelectedSegment];
// Hide renderers toolbar item at first. Start discoveries and wait for notifications about
// renderers being added or removed to keep hidden or show depending on outcome
[self hideToolbarItem:_renderersToolbarItem];
[VLCMain.sharedInstance.mainMenu.rendererMenuController startRendererDiscoveries];
[self updatePlayqueueToggleState];
}
- (void)dealloc
......@@ -361,158 +321,31 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[self setViewForSelectedSegment];
}
- (void)hideToolbarItem:(NSToolbarItem *)toolbarItem
{
NSInteger toolbarItemIndex = [[self.toolbar items] indexOfObject:toolbarItem];
if (toolbarItemIndex != NSNotFound) {
[self.toolbar removeItemAtIndex:toolbarItemIndex];
}
}
/*
* Try to insert the toolbar item ahead of a group of possible toolbar items.
* "items" should contain items sorted from the trailing edge of the toolbar to leading edge.
* "toolbarItem" will be inserted as close to the trailing edge as possible.
*
* If you have: | item1 | item2 | item3 | item4 |
* and the "items" parameter is an array containing @[item6, item5, item2, item1]
* then the "toolbarItem" provided to this function will place toolbarItem thus:
* | item1 | item2 | toolbarItem | item3 | item4 |
*/
- (void)insertToolbarItem:(NSToolbarItem *)toolbarItem inFrontOf:(NSArray<NSToolbarItem *> *)items
{
NSParameterAssert(toolbarItem != nil && items != nil && toolbarItem.itemIdentifier.length > 0);
NSInteger toolbarItemIndex = [[self.toolbar items] indexOfObject:toolbarItem];
if (toolbarItemIndex != NSNotFound) {
return;
}
for (NSToolbarItem *item in items) {
NSInteger itemIndex = [[self.toolbar items] indexOfObject:item];
if (itemIndex != NSNotFound) {
[self.toolbar insertItemWithItemIdentifier:toolbarItem.itemIdentifier atIndex:itemIndex + 1];
return;
}
}
[self.toolbar insertItemWithItemIdentifier:toolbarItem.itemIdentifier atIndex:0];
}
- (void)setForwardsBackwardsToolbarItemsVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:_forwardsToolbarItem];
[self hideToolbarItem:_backwardsToolbarItem];
return;
}
[self insertToolbarItem:_backwardsToolbarItem inFrontOf:@[_trackingSeparatorToolbarItem,
_toggleNavSidebarToolbarItem]];
[self insertToolbarItem:_forwardsToolbarItem inFrontOf:@[_backwardsToolbarItem,
_trackingSeparatorToolbarItem,
_toggleNavSidebarToolbarItem]];
}
- (void)setSortOrderToolbarItemVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:_sortOrderToolbarItem];
return;
}
[self insertToolbarItem:_sortOrderToolbarItem
inFrontOf:@[_libraryViewModeToolbarItem,
_forwardsToolbarItem,
_backwardsToolbarItem,
_trackingSeparatorToolbarItem,
_toggleNavSidebarToolbarItem]];
}
- (void)setLibrarySearchToolbarItemVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:_librarySearchToolbarItem];
[self stopSearchTimer];
_librarySearchField.stringValue = @"";
[self updateFilterString];
return;
}
// Display as far to the right as possible, but not in front of the playlist toggle button
NSMutableArray<NSToolbarItem *> *currentToolbarItems = [NSMutableArray arrayWithArray:self.toolbar.items];
if (currentToolbarItems.lastObject == _togglePlaylistToolbarItem) {
[currentToolbarItems removeLastObject];
}
NSArray *reversedCurrentToolbarItems = [[currentToolbarItems reverseObjectEnumerator] allObjects];
[self insertToolbarItem:_librarySearchToolbarItem inFrontOf:reversedCurrentToolbarItems];
}
- (void)setViewModeToolbarItemVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:self.libraryViewModeToolbarItem];
return;
}
[self insertToolbarItem:self.libraryViewModeToolbarItem inFrontOf:@[
self.toggleNavSidebarToolbarItem,
self.trackingSeparatorToolbarItem,
self.forwardsToolbarItem,
self.backwardsToolbarItem
]];
}
- (void)updatePlayqueueToggleState
{
NSView * const playlistView = self.splitViewController.playlistSidebarViewController.view;
_playQueueToggle.state = [self.mainSplitView isSubviewCollapsed:playlistView] ?
NSControlStateValueOff : NSControlStateValueOn;
}
- (void)showHomeLibrary
{
// Only collection view mode
[self setForwardsBackwardsToolbarItemsVisible:NO];
[self setSortOrderToolbarItemVisible:YES];
[self setLibrarySearchToolbarItemVisible:YES];
[self setViewModeToolbarItemVisible:NO];
[self.toolbarDelegate layoutForSegment:VLCLibraryHomeSegment];
[_libraryHomeViewController presentHomeView];
}
- (void)showVideoLibrary
{
[self setForwardsBackwardsToolbarItemsVisible:NO];
[self setSortOrderToolbarItemVisible:YES];
[self setLibrarySearchToolbarItemVisible:YES];
[self setViewModeToolbarItemVisible:YES];
[self.toolbarDelegate layoutForSegment:VLCLibraryVideoSegment];
[_libraryVideoViewController presentVideoView];
}
- (void)showAudioLibrary
{
[self setForwardsBackwardsToolbarItemsVisible:NO];
[self setSortOrderToolbarItemVisible:YES];
[self setLibrarySearchToolbarItemVisible:YES];
[self setViewModeToolbarItemVisible:YES];
[self.toolbarDelegate layoutForSegment:VLCLibraryMusicSegment];
self.libraryAudioViewController.currentSegmentType = self.librarySegmentType;
}
- (void)showMediaSourceLibrary
{
[self.navigationStack clear];
[self setForwardsBackwardsToolbarItemsVisible:YES];
[self setSortOrderToolbarItemVisible:NO];
[self setLibrarySearchToolbarItemVisible:NO];
[self setViewModeToolbarItemVisible:YES];
const VLCLibrarySegmentType segmentType = self.librarySegmentType;
[self.toolbarDelegate layoutForSegment:segmentType];
if (segmentType == VLCLibraryBrowseSegment) {
[_libraryMediaSourceViewController presentBrowseView];
} else if (segmentType == VLCLibraryStreamsSegment) {
......@@ -585,7 +418,7 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[VLCMain.sharedInstance.libraryController filterByString:_librarySearchField.stringValue];
}
- (void)clearLibraryFilterString
- (void)clearFilterString
{
[self stopSearchTimer];
_librarySearchField.stringValue = @"";
......@@ -767,18 +600,6 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
}
[self presentVideoView];
[self.forwardsNavigationButton setHidden:YES];
[self.gridVsListSegmentedControl setHidden:YES];
[self.librarySortButton setHidden:YES];
[self.librarySearchField setEnabled:NO];
[self clearLibraryFilterString];
// Make sure the back button is visible...
[self insertToolbarItem:_backwardsToolbarItem inFrontOf:@[_trackingSeparatorToolbarItem, _toggleNavSidebarToolbarItem]];
// And repurpose it to hide the video view
[self.backwardsNavigationButton setEnabled:YES];
[self enableVideoTitleBarMode];
[self hideControlsBarImmediately];
[self.videoViewController showControls];
......@@ -792,19 +613,9 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[VLCMain.sharedInstance.voutProvider updateWindowLevelForHelperWindows: NSNormalWindowLevel];
// restore alpha value to 1 for the case that macosx-opaqueness is set to < 1
[self setAlphaValue:1.0];
self.alphaValue = 1.0;
self.videoViewController.view.hidden = YES;
[self.forwardsNavigationButton setHidden:NO];
[self.gridVsListSegmentedControl setHidden:NO];
[self.librarySortButton setHidden:NO];
[self.librarySearchField setEnabled:YES];
// Reset the back button to navigation state
[self.backwardsNavigationButton setEnabled:_navigationStack.backwardsAvailable];
[self setViewForSelectedSegment];
[self disableVideoTitleBarMode];
[self showControlsBarImmediately];
self.splitViewController.playlistSidebarViewController.mainVideoModeEnabled = NO;
......@@ -857,27 +668,4 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
}
}
#pragma mark -
#pragma mark respond to renderers
- (void)renderersChanged:(NSNotification *)notification
{
const NSUInteger rendererCount = VLCMain.sharedInstance.mainMenu.rendererMenuController.rendererItems.count;
const BOOL rendererToolbarItemVisible = [self.toolbar.items containsObject:_renderersToolbarItem];
if (rendererCount > 0 && !rendererToolbarItemVisible) {
[self insertToolbarItem:_renderersToolbarItem
inFrontOf:@[_sortOrderToolbarItem, _libraryViewModeToolbarItem, _forwardsToolbarItem, _backwardsToolbarItem]];
} else if (rendererCount == 0 && rendererToolbarItemVisible) {
[self hideToolbarItem:_renderersToolbarItem];
}
}
- (void)rendererControlAction:(id)sender
{
[NSMenu popUpContextMenu:VLCMain.sharedInstance.mainMenu.rendererMenu
withEvent:NSApp.currentEvent
forView:sender];
}
@end
......@@ -22,6 +22,8 @@
#import <Cocoa/Cocoa.h>
#import "library/VLCLibrarySegment.h"
NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryWindow;
......@@ -30,9 +32,24 @@ extern NSString * const VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier;
@interface VLCLibraryWindowToolbarDelegate : NSObject<NSToolbarDelegate>
@property (readonly) VLCLibraryWindow *libraryWindow;
@property (readwrite, weak) IBOutlet VLCLibraryWindow *libraryWindow;
@property (readwrite, weak) IBOutlet NSToolbar *toolbar;
@property (readonly, strong) NSToolbarItem *trackingSeparatorToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *toggleNavSidebarToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *backwardsToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *forwardsToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *libraryViewModeToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *sortOrderToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *flexibleSpaceToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *librarySearchToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *togglePlaylistToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *renderersToolbarItem;
- (IBAction)rendererControlAction:(id)sender;
- (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow;
- (void)layoutForSegment:(VLCLibrarySegmentType)segment;
@end
......
......@@ -22,33 +22,275 @@
#import "VLCLibraryWindowToolbarDelegate.h"
#import "extensions/NSString+Helpers.h"
#import "library/VLCLibraryWindow.h"
#import "library/VLCLibraryWindowPlaylistSidebarViewController.h"
#import "library/VLCLibraryWindowSplitViewController.h"
NSString * const VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier = @"VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier";
#import "main/VLCMain.h"
#import "menus/VLCMainMenu.h"
#import "menus/renderers/VLCRendererMenuController.h"
NSString * const VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier =
@"VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier";
@implementation VLCLibraryWindowToolbarDelegate
- (nonnull instancetype)initWithLibraryWindow:(nonnull VLCLibraryWindow *)libraryWindow
#pragma mark - XIB handling
- (void)awakeFromNib
{
self = [super init];
if (self) {
_libraryWindow = libraryWindow;
self.toolbar.allowsUserCustomization = NO;
if (@available(macOS 11.0, *)) {
const NSInteger navSidebarToggleToolbarItemIndex =
[self.toolbar.items indexOfObject:self.toggleNavSidebarToolbarItem];
NSAssert(navSidebarToggleToolbarItemIndex != NSNotFound,
@"Could not find navigation sidebar toggle toolbar item!");
const NSInteger trackingSeparatorItemIndex = navSidebarToggleToolbarItemIndex + 1;
[self.toolbar
insertItemWithItemIdentifier:VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier
atIndex:trackingSeparatorItemIndex];
_trackingSeparatorToolbarItem =
[self.toolbar.items objectAtIndex:trackingSeparatorItemIndex];
}
return self;
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(renderersChanged:)
name:VLCRendererAddedNotification
object:nil];
[notificationCenter addObserver:self
selector:@selector(renderersChanged:)
name:VLCRendererRemovedNotification
object:nil];
self.libraryViewModeToolbarItem.toolTip = _NS("Grid View or List View");
self.sortOrderToolbarItem.toolTip = _NS("Select Sorting Mode");
self.togglePlaylistToolbarItem.toolTip = _NS("Toggle Playqueue");
// Hide renderers toolbar item at first. Start discoveries and wait for notifications about
// renderers being added or removed to keep hidden or show depending on outcome
[self hideToolbarItem:self.renderersToolbarItem];
[VLCMain.sharedInstance.mainMenu.rendererMenuController startRendererDiscoveries];
[self updatePlayqueueToggleState];
}
#pragma mark - toolbar delegate methods
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
itemForItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier
willBeInsertedIntoToolbar:(BOOL)flag
{
if ([itemIdentifier isEqualToString:VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier]) {
if (@available(macOS 11.0, *)) {
return [NSTrackingSeparatorToolbarItem trackingSeparatorToolbarItemWithIdentifier:itemIdentifier splitView:_libraryWindow.mainSplitView dividerIndex:VLCLibraryWindowNavigationSidebarSplitViewDividerIndex];
return [NSTrackingSeparatorToolbarItem
trackingSeparatorToolbarItemWithIdentifier:itemIdentifier
splitView:self.libraryWindow.mainSplitView
dividerIndex:VLCLibraryWindowNavigationSidebarSplitViewDividerIndex];
}
}
return nil;
}
#pragma mark - renderers toolbar item handling
- (IBAction)rendererControlAction:(id)sender
{
[NSMenu popUpContextMenu:VLCMain.sharedInstance.mainMenu.rendererMenu
withEvent:NSApp.currentEvent
forView:sender];
}
- (void)renderersChanged:(NSNotification *)notification
{
const NSUInteger rendererCount =
VLCMain.sharedInstance.mainMenu.rendererMenuController.rendererItems.count;
const BOOL rendererToolbarItemVisible =
[self.toolbar.items containsObject:self.renderersToolbarItem];
if (rendererCount > 0 && !rendererToolbarItemVisible) {
[self insertToolbarItem:self.renderersToolbarItem
inFrontOf:@[self.sortOrderToolbarItem,
self.libraryViewModeToolbarItem,
self.forwardsToolbarItem,
self.backwardsToolbarItem]];
} else if (rendererCount == 0 && rendererToolbarItemVisible) {
[self hideToolbarItem:self.renderersToolbarItem];
}
}
#pragma mark - play queue toggle toolbar item handling
- (void)updatePlayqueueToggleState
{
NSView * const playlistView =
self.libraryWindow.splitViewController.playlistSidebarViewController.view;
self.libraryWindow.playQueueToggle.state =
[self.libraryWindow.mainSplitView isSubviewCollapsed:playlistView] ?
NSControlStateValueOff : NSControlStateValueOn;
}
#pragma mark - convenience method for configuration of toolbar items layout
- (void)layoutForSegment:(VLCLibrarySegmentType)segment
{
switch(segment) {
case VLCLibraryLowSentinelSegment:
vlc_assert_unreachable();
case VLCLibraryHomeSegment:
[self setForwardsBackwardsToolbarItemsVisible:NO];
[self setSortOrderToolbarItemVisible:NO];
[self setLibrarySearchToolbarItemVisible:NO];
[self setViewModeToolbarItemVisible:NO];
break;
case VLCLibraryVideoSegment:
[self setForwardsBackwardsToolbarItemsVisible:NO];
[self setSortOrderToolbarItemVisible:YES];
[self setLibrarySearchToolbarItemVisible:YES];
[self setViewModeToolbarItemVisible:YES];
break;
case VLCLibraryMusicSegment:
case VLCLibraryArtistsMusicSubSegment:
case VLCLibraryAlbumsMusicSubSegment:
case VLCLibrarySongsMusicSubSegment:
case VLCLibraryGenresMusicSubSegment:
[self setForwardsBackwardsToolbarItemsVisible:NO];
[self setSortOrderToolbarItemVisible:YES];
[self setLibrarySearchToolbarItemVisible:YES];
[self setViewModeToolbarItemVisible:YES];
break;
case VLCLibraryBrowseSegment:
case VLCLibraryStreamsSegment:
[self setForwardsBackwardsToolbarItemsVisible:YES];
[self setSortOrderToolbarItemVisible:NO];
[self setLibrarySearchToolbarItemVisible:NO];
[self setViewModeToolbarItemVisible:YES];
break;
case VLCLibraryHighSentinelSegment:
vlc_assert_unreachable();
}
}
#pragma mark - item visibility handling
- (void)hideToolbarItem:(NSToolbarItem *)toolbarItem
{
const NSInteger toolbarItemIndex = [self.toolbar.items indexOfObject:toolbarItem];
if (toolbarItemIndex != NSNotFound) {
[self.toolbar removeItemAtIndex:toolbarItemIndex];
}
}
/*
* Try to insert the toolbar item ahead of a group of possible toolbar items.
* "items" should contain items sorted from the trailing edge of the toolbar to leading edge.
* "toolbarItem" will be inserted as close to the trailing edge as possible.
*
* If you have: | item1 | item2 | item3 | item4 |
* and the "items" parameter is an array containing @[item6, item5, item2, item1]
* then the "toolbarItem" provided to this function will place toolbarItem thus:
* | item1 | item2 | toolbarItem | item3 | item4 |
*/
- (void)insertToolbarItem:(NSToolbarItem *)toolbarItem inFrontOf:(NSArray<NSToolbarItem *> *)items
{
NSParameterAssert(toolbarItem != nil);
NSParameterAssert(items != nil);
NSParameterAssert(toolbarItem.itemIdentifier.length > 0);
const NSInteger toolbarItemIndex = [self.toolbar.items indexOfObject:toolbarItem];
if (toolbarItemIndex != NSNotFound) {
return;
}
for (NSToolbarItem * const item in items) {
const NSInteger itemIndex = [self.toolbar.items indexOfObject:item];
if (itemIndex != NSNotFound) {
[self.toolbar insertItemWithItemIdentifier:toolbarItem.itemIdentifier
atIndex:itemIndex + 1];
return;
}
}
[self.toolbar insertItemWithItemIdentifier:toolbarItem.itemIdentifier atIndex:0];
}
#pragma mark - convenience methods for hiding/showing and positioning certain toolbar items
- (void)setForwardsBackwardsToolbarItemsVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:self.forwardsToolbarItem];
[self hideToolbarItem:self.backwardsToolbarItem];
return;
}
[self insertToolbarItem:self.backwardsToolbarItem
inFrontOf:@[self.trackingSeparatorToolbarItem,
self.toggleNavSidebarToolbarItem]];
[self insertToolbarItem:self.forwardsToolbarItem
inFrontOf:@[self.backwardsToolbarItem,
self.trackingSeparatorToolbarItem,
self.toggleNavSidebarToolbarItem]];
}
- (void)setSortOrderToolbarItemVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:self.sortOrderToolbarItem];
return;
}
[self insertToolbarItem:self.sortOrderToolbarItem
inFrontOf:@[self.libraryViewModeToolbarItem,
self.forwardsToolbarItem,
self.backwardsToolbarItem,
self.trackingSeparatorToolbarItem,
self.toggleNavSidebarToolbarItem]];
}
- (void)setLibrarySearchToolbarItemVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:self.librarySearchToolbarItem];
[self.libraryWindow clearFilterString];
return;
}
// Display as far to the right as possible, but not in front of the playlist toggle button
NSMutableArray<NSToolbarItem *> * const currentToolbarItems =
[NSMutableArray arrayWithArray:self.toolbar.items];
if (currentToolbarItems.lastObject == self.togglePlaylistToolbarItem) {
[currentToolbarItems removeLastObject];
}
NSArray * const reversedCurrentToolbarItems =
currentToolbarItems.reverseObjectEnumerator.allObjects;
[self insertToolbarItem:self.librarySearchToolbarItem
inFrontOf:reversedCurrentToolbarItems];
}
- (void)setViewModeToolbarItemVisible:(BOOL)visible
{
if (!visible) {
[self hideToolbarItem:self.libraryViewModeToolbarItem];
return;
}
[self insertToolbarItem:self.libraryViewModeToolbarItem
inFrontOf:@[self.forwardsToolbarItem,
self.backwardsToolbarItem,
self.trackingSeparatorToolbarItem,
self.toggleNavSidebarToolbarItem]];
}
@end
......@@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) NSArray<NSLayoutConstraint *> *audioPlaceholderImageViewSizeConstraints;
- (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow;
- (IBAction)segmentedControlAction:(id)sender;
- (void)presentAudioView;
- (void)reloadData;
- (void)presentLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
......