]> git.sesse.net Git - vlc/commitdiff
macosx: show the playlist size as a badge in the sidebar and fixed an appearance...
authorFelix Paul Kühne <fkuehne@videolan.org>
Fri, 19 Aug 2011 15:28:32 +0000 (17:28 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Fri, 19 Aug 2011 15:28:32 +0000 (17:28 +0200)
extras/package/macosx/Resources/English.lproj/MainMenu.xib
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.m

index f25af13507ff5bbba6cbb608f58c51794543c948..216683964b9a3540ca521b72390982ca003da110 100644 (file)
                        <string key="com.binarymethod.BGHUDAppKitPlugin">1</string>
                </dictionary>
                <array class="NSMutableArray" key="IBDocument.EditedObjectIDs">
-                       <integer value="4682"/>
+                       <integer value="283"/>
+                       <integer value="915"/>
                        <integer value="1617"/>
+                       <integer value="2730"/>
                        <integer value="334"/>
                        <integer value="4596"/>
-                       <integer value="283"/>
+                       <integer value="21"/>
                        <integer value="4722"/>
-                       <integer value="2730"/>
-                       <integer value="915"/>
                </array>
                <array key="IBDocument.PluginDependencies">
                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                                                                                                <object class="NSOutlineView" id="1064884668">
                                                                                                                        <reference key="NSNextResponder" ref="18556274"/>
                                                                                                                        <int key="NSvFlags">4352</int>
-                                                                                                                       <string key="NSFrameSize">{121, 272}</string>
+                                                                                                                       <string key="NSFrameSize">{120, 272}</string>
                                                                                                                        <reference key="NSSuperview" ref="18556274"/>
                                                                                                                        <int key="NSViewLayerContentsRedrawPolicy">2</int>
                                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                                        </object>
                                                                                                                        <array class="NSMutableArray" key="NSTableColumns">
                                                                                                                                <object class="NSTableColumn" id="291003631">
-                                                                                                                                       <double key="NSWidth">118</double>
+                                                                                                                                       <double key="NSWidth">117</double>
                                                                                                                                        <double key="NSMinWidth">16</double>
                                                                                                                                        <double key="NSMaxWidth">1000</double>
                                                                                                                                        <object class="NSTableHeaderCell" key="NSHeaderCell">
                                                                                                                        <float key="NSOutlineViewIndentationPerLevelKey">14</float>
                                                                                                                </object>
                                                                                                        </array>
-                                                                                                       <string key="NSFrame">{{1, 1}, {121, 272}}</string>
+                                                                                                       <string key="NSFrame">{{1, 1}, {120, 272}}</string>
                                                                                                        <reference key="NSSuperview" ref="979766179"/>
                                                                                                        <reference key="NSNextKeyView" ref="1064884668"/>
                                                                                                        <int key="NSViewLayerContentsRedrawPolicy">2</int>
                                                                                                        <double key="NSPercent">0.9953052</double>
                                                                                                </object>
                                                                                        </array>
-                                                                                       <string key="NSFrame">{{-1, 0}, {123, 274}}</string>
+                                                                                       <string key="NSFrameSize">{122, 274}</string>
                                                                                        <reference key="NSSuperview" ref="824340487"/>
                                                                                        <reference key="NSNextKeyView" ref="18556274"/>
                                                                                        <int key="NSViewLayerContentsRedrawPolicy">2</int>
@@ -6947,6 +6947,14 @@ LCAuLi4</string>
                                        </object>
                                        <int key="connectionID">4751</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">o_left_split_view</string>
+                                               <reference key="source" ref="498338108"/>
+                                               <reference key="destination" ref="824340487"/>
+                                       </object>
+                                       <int key="connectionID">4752</int>
+                               </object>
                        </array>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <array key="orderedObjects">
@@ -10232,6 +10240,9 @@ LCAuLi4</string>
                                        <bytes key="NSTransformStruct">AUMMAABBoAAAA</bytes>
                                </object>
                                <string key="4713.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+                               <object class="NSAffineTransform" key="4713.IBViewBoundsToFrameTransform">
+                                       <bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw4gAAA</bytes>
+                               </object>
                                <string key="4714.CustomClassName">PXSourceList</string>
                                <string key="4714.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
                                <string key="4715.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -10312,7 +10323,7 @@ LCAuLi4</string>
                        <nil key="activeLocalization"/>
                        <dictionary class="NSMutableDictionary" key="localizations"/>
                        <nil key="sourceID"/>
-                       <int key="maxID">4751</int>
+                       <int key="maxID">4752</int>
                </object>
                <object class="IBClassDescriber" key="IBDocument.Classes">
                        <array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -13441,6 +13452,7 @@ LCAuLi4</string>
                                                <string key="o_fspanel">VLCFSPanel</string>
                                                <string key="o_fullscreen_btn">id</string>
                                                <string key="o_fwd_btn">id</string>
+                                               <string key="o_left_split_view">id</string>
                                                <string key="o_play_btn">id</string>
                                                <string key="o_playlist_btn">id</string>
                                                <string key="o_playlist_table">id</string>
@@ -13505,6 +13517,10 @@ LCAuLi4</string>
                                                        <string key="name">o_fwd_btn</string>
                                                        <string key="candidateClassName">id</string>
                                                </object>
+                                               <object class="IBToOneOutletInfo" key="o_left_split_view">
+                                                       <string key="name">o_left_split_view</string>
+                                                       <string key="candidateClassName">id</string>
+                                               </object>
                                                <object class="IBToOneOutletInfo" key="o_play_btn">
                                                        <string key="name">o_play_btn</string>
                                                        <string key="candidateClassName">id</string>
index c353e2365960690fe3835ee1edb6a8d510c5f850..3e887d1bb0704b2683d3de51c0373d358027c42c 100644 (file)
@@ -58,6 +58,7 @@
     IBOutlet id o_playlist_table;
     IBOutlet id o_video_view;
     IBOutlet id o_split_view;
+    IBOutlet id o_left_split_view;
     IBOutlet id o_right_split_view;
     IBOutlet id o_sidebar_view;
     IBOutlet id o_chosen_category_lbl;
index 2c2544fbb8d0cbaab943de3ea4232e6c61b59e95..b449b2e1471123fe6ebfabf269d9f15e994e08b0 100644 (file)
@@ -235,6 +235,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     o_temp_view = [[NSView alloc] init];
     [o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
     [o_dropzone_view setFrame: [o_playlist_table frame]];
+    [o_left_split_view setFrame: [o_sidebar_view frame]];
     if (OSX_LION)
     {
         [self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
@@ -755,6 +756,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
     b_plmul = playlist_CurrentSize( p_playlist ) > 1;
     PL_UNLOCK;
 
+    [o_sidebar_view reloadData];
+
     input_thread_t * p_input = playlist_CurrentInput( p_playlist );
 
     bool b_buffering = NO;
@@ -1450,12 +1453,25 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (BOOL)sourceList:(PXSourceList*)aSourceList itemHasBadge:(id)item
 {
+    if ([[item identifier] isEqualToString: @"playlist"])
+        return YES;
+
        return [item hasBadge];
 }
 
 
 - (NSInteger)sourceList:(PXSourceList*)aSourceList badgeValueForItem:(id)item
 {
+    if ([[item identifier] isEqualToString: @"playlist"]) {
+        playlist_t * p_playlist = pl_Get( VLCIntf );
+        NSInteger i_playlist_size;
+
+        PL_LOCK;
+        i_playlist_size = playlist_CurrentSize( p_playlist );
+        PL_UNLOCK;
+
+        return i_playlist_size;
+    }
        return [item badgeValue];
 }