]> git.sesse.net Git - vlc/commitdiff
macosx: changed the data appearance in the info panel to the following behaviour...
authorFelix Paul Kühne <fkuehne@videolan.org>
Fri, 16 Jan 2009 19:29:58 +0000 (20:29 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Fri, 16 Jan 2009 19:36:47 +0000 (20:36 +0100)
Empty selections in the playlist are still not allowed, as this would lead to some trouble I don't want to solve for this old panel (to be fixed once the dudiak branch is merged)

modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/playlist.m

index e851d409b0f34019f5ea535925622f9e133e4e66..75c3f756903685ef3029dffd0ef940e43d29f62d 100644 (file)
@@ -343,6 +343,7 @@ struct intf_sys_t
 - (id)getSimplePreferences;
 - (id)getPreferences;
 - (id)getPlaylist;
+- (BOOL)isPlaylistCollapsed;
 - (id)getInfo;
 - (id)getWizard;
 - (id)getBookmarks;
index 902af53d848ceb1aecc38ad81474128e1b6441e0..4d2691a41de683f2daa40ac167c2fd33fe32a206 100644 (file)
@@ -1277,6 +1277,11 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
     return nil;
 }
 
+- (BOOL)isPlaylistCollapsed
+{
+    return ![o_btn_playlist state];
+}
+
 - (id)getInfo
 {
     if( o_info )
@@ -1511,10 +1516,10 @@ static void * manage_cleanup( void * args )
                 b_buffering = YES;
             }
 
-            /* update our info-panel to reflect the new item */
-            [[[VLCMain sharedInstance] getInfo]
-                updatePanelWithItem: 
-                    playlist_CurrentPlayingItem( p_playlist )->p_input];
+            /* update our info-panel to reflect the new item, if we don't show
+             * the playlist or the selection is empty */
+            if( [self isPlaylistCollapsed] == YES )
+                [[self getInfo] updatePanelWithItem: playlist_CurrentPlayingItem( p_playlist )->p_input];
 
             /* seekable streams */
             b_seekable = var_GetBool( p_input, "can-seek" );
@@ -2502,13 +2507,11 @@ end:
 - (void)updateTogglePlaylistState
 {
     if( [o_window contentRectForFrameRect:[o_window frame]].size.height <= 169. )
-    {
         [o_btn_playlist setState: NO];
-    }
     else
-    {
         [o_btn_playlist setState: YES];
-    }
+
+    [[self getPlaylist] outlineViewSelectionDidChange: NULL];
 }
 
 - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize
index aa49b2fbe36af55743bc69894a244c3e2db5dc96..a07ecd4afa24975db0764b8e9fd9971829b4f34c 100644 (file)
         }
         [o_mi_revealInFinder setEnabled: NO];
         [o_mm_mi_revealInFinder setEnabled: NO];
+
+        if( [[VLCMain sharedInstance] isPlaylistCollapsed] == NO )
+        {
+            /* update our info-panel to reflect the new item, if we aren't collapsed */
+            [[[VLCMain sharedInstance] getInfo] updatePanelWithItem:p_item->p_input];
+        }
     }
 }