[vlc-devel] commit: macosx: changed the data appearance in the info panel to the following behaviour: if playlist is collapsed, we show data about the currently playing item. if the playlist is shown, we show data about the current selection in the list, regardless of the current item. ( Felix Paul Kühne )
git version control
git at videolan.org
Fri Jan 16 20:40:47 CET 2009
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jan 16 20:29:58 2009 +0100| [5ea391e96cd3eda2b9df3305fe3aa015ddc58778] | committer: Felix Paul Kühne
macosx: changed the data appearance in the info panel to the following behaviour: if playlist is collapsed, we show data about the currently playing item. if the playlist is shown, we show data about the current selection in the list, regardless of the current item.
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)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ea391e96cd3eda2b9df3305fe3aa015ddc58778
---
modules/gui/macosx/intf.h | 1 +
modules/gui/macosx/intf.m | 19 +++++++++++--------
modules/gui/macosx/playlist.m | 6 ++++++
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index e851d40..75c3f75 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -343,6 +343,7 @@ struct intf_sys_t
- (id)getSimplePreferences;
- (id)getPreferences;
- (id)getPlaylist;
+- (BOOL)isPlaylistCollapsed;
- (id)getInfo;
- (id)getWizard;
- (id)getBookmarks;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 902af53..4d2691a 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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
diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index aa49b2f..a07ecd4 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -548,6 +548,12 @@
}
[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];
+ }
}
}
More information about the vlc-devel
mailing list