Commit 023c81ca authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: provide a way to hide the dropzone eventhough the playlist is empty...

macosx: provide a way to hide the dropzone eventhough the playlist is empty (just press the toggle pl button)

close #5925
(cherry picked from commit 7f63022f8a94871fd6ca1be2c9c69660ff1d7f6e)
parent c8fc21db
......@@ -73,6 +73,7 @@
BOOL b_dark_interface;
BOOL b_nativeFullscreenMode;
BOOL b_video_playback_enabled;
BOOL b_dropzone_active;
int i_lastShownVolume;
input_state_e cachedInputState;
......
......@@ -255,7 +255,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setTitle: _NS("VLC media player")];
[o_time_fld setAlignment: NSCenterTextAlignment];
[o_time_fld setNeedsDisplay:YES];
[o_playlist_btn setEnabled:NO];
b_dropzone_active = YES;
o_temp_view = [[NSView alloc] init];
[o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[o_dropzone_view setFrame: [o_playlist_table frame]];
......@@ -562,9 +562,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (IBAction)togglePlaylist:(id)sender
{
if (b_dropzone_active)
{
b_dropzone_active = NO;
[self hideDropZone];
return;
}
if (!b_nonembedded)
{
if ([o_video_view isHidden] && [o_playlist_btn isEnabled]) {
if ([o_video_view isHidden] && [[VLCMain sharedInstance] activeVideoPlayback]) {
[o_split_view setHidden: YES];
[o_video_view setHidden: NO];
[self makeFirstResponder: o_video_view];
......@@ -935,6 +942,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
#pragma mark Update interface and respond to foreign events
- (void)showDropZone
{
b_dropzone_active = YES;
[o_right_split_view addSubview: o_dropzone_view];
[o_dropzone_view setFrame: [o_playlist_table frame]];
[[o_playlist_table animator] setHidden:YES];
......@@ -1217,14 +1225,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
BOOL b_videoPlayback = [[VLCMain sharedInstance] activeVideoPlayback];
if (!b_nonembedded)
[o_playlist_btn setEnabled: b_videoPlayback];
else
{
[o_playlist_btn setEnabled: NO];
if (!b_videoPlayback)
[o_nonembedded_window orderOut: nil];
}
if (!b_videoPlayback)
[o_nonembedded_window orderOut: nil];
if( OSX_LION && b_nativeFullscreenMode )
{
if( [NSApp presentationOptions] & NSApplicationPresentationFullScreen )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment