[vlc-commits] macosx: Initialize sidebar in main window

David Fuhrmann git at videolan.org
Tue Apr 6 09:55:42 UTC 2021


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Fri Apr  2 12:18:00 2021 +0200| [edd5319c1a95210edac9d9544d77998747605419] | committer: David Fuhrmann

macosx: Initialize sidebar in main window

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

 modules/gui/macosx/VLCMainWindow.m        | 3 +++
 modules/gui/macosx/VLCSidebarDataSource.m | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index a484369bcd..36f0748516 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -177,6 +177,9 @@ static const float f_min_window_height = 307.;
     self.sidebarDataSource.sidebarView = self.sidebarView;
 
     [self.sidebarDataSource reloadSidebar];
+    [_sidebarView setAutosaveName:@"mainwindow-sidebar"];
+    [_sidebarView setAutosaveExpandedItems:YES];
+
     [_sidebarView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
 
     /*
diff --git a/modules/gui/macosx/VLCSidebarDataSource.m b/modules/gui/macosx/VLCSidebarDataSource.m
index 4ab75d3e85..ee39ca5f49 100644
--- a/modules/gui/macosx/VLCSidebarDataSource.m
+++ b/modules/gui/macosx/VLCSidebarDataSource.m
@@ -146,10 +146,8 @@
     [_sidebarView setDropItem:playlistItem dropChildIndex:NSOutlineViewDropOnItemIndex];
     [_sidebarView registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]];
 
-    [_sidebarView setAutosaveName:@"mainwindow-sidebar"];
     [_sidebarView setDataSource:self];
     [_sidebarView setDelegate:self];
-    [_sidebarView setAutosaveExpandedItems:YES];
 
     [_sidebarView expandItem:libraryItem expandChildren:YES];
 



More information about the vlc-commits mailing list