[vlc-commits] macosx: always expand all sidebar nodes on launch (fixes #5811) and make sure that the sidebar isn't editable by the user

Felix Paul Kühne git at videolan.org
Sun Jan 8 15:08:40 CET 2012


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jan  8 14:18:35 2012 +0100| [ed5f49bbf11ea7f258bf6a8962205627e6a9e391] | committer: Jean-Baptiste Kempf

macosx: always expand all sidebar nodes on launch (fixes #5811) and make sure that the sidebar isn't editable by the user
(cherry picked from commit 72f3e860b6f12775f9d965121f34a994f3dcbf74)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 .../macosx/Resources/English.lproj/MainMenu.xib    |   14 +++++++-------
 modules/gui/macosx/MainWindow.m                    |    8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index 18a5e49..dc54753 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -21,16 +21,16 @@
     </object>
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
-      <integer value="2770"/>
-      <integer value="1617"/>
+      <integer value="283"/>
       <integer value="29"/>
-      <integer value="21"/>
-      <integer value="4722"/>
-      <integer value="915"/>
       <integer value="4596"/>
-      <integer value="283"/>
+      <integer value="1617"/>
       <integer value="4895"/>
+      <integer value="4722"/>
+      <integer value="2770"/>
       <integer value="2730"/>
+      <integer value="4717"/>
+      <integer value="915"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -130,7 +130,7 @@
                                     </object>
                                   </object>
                                   <object class="NSTextFieldCell" key="NSDataCell" id="1022116109">
-                                    <int key="NSCellFlags">337772096</int>
+                                    <int key="NSCellFlags">67239488</int>
                                     <int key="NSCellFlags2">2048</int>
                                     <string key="NSContents">Text Cell</string>
                                     <object class="NSFont" key="NSSupport">
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 36bca2d..c2e5de3 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -391,6 +391,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
     [o_sidebar_view reloadData];
     [o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:YES];
+    NSUInteger i_sidebaritem_count = [o_sidebaritems count];
+    for (NSUInteger x = 0; x < i_sidebaritem_count; x++)
+        [o_sidebar_view expandItem: [o_sidebaritems objectAtIndex: x] expandChildren: YES];
 
     if( b_dark_interface )
     {
@@ -1893,10 +1896,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 /* taken under BSD-new from the PXSourceList sample project, adapted for VLC */
 - (BOOL)sourceList:(PXSourceList*)aSourceList isGroupAlwaysExpanded:(id)group
 {
-	if([[group identifier] isEqualToString:@"library"])
-		return YES;
-
-	return NO;
+    return NO;
 }
 
 - (void)sourceListSelectionDidChange:(NSNotification *)notification



More information about the vlc-commits mailing list