...
 
Commits (1)
......@@ -399,8 +399,8 @@ static NSString *kAssociatedFullscreenRect = @"VLCFullscreenAssociatedWindowRect
return;
/* Get timeout and make sure it is not lower than 1 second */
long long _timeToKeepVisibleInSec = MAX(var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000, 1);
long long _timeToKeepVisibleInSec = MAX(var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000, 1);
_hideTimer = [NSTimer scheduledTimerWithTimeInterval:_timeToKeepVisibleInSec
target:self
selector:@selector(autohideCallback:)
......
......@@ -1286,6 +1286,7 @@
- (IBAction)showLicense:(id)sender
{
[[VLCMain sharedInstance] showFullscreenController];
if (!_aboutWindowController)
_aboutWindowController = [[VLCAboutWindowController alloc] init];
......
......@@ -36,6 +36,7 @@
@class VLCDetachedVideoWindow;
@class VLCMainWindowControlsBar;
@class VLCFSPanelController;
@class VLCVoutView;
@class PXSourceList;
......@@ -92,6 +93,7 @@ typedef enum {
@property (readwrite) BOOL nonembedded;
@property (readonly) VLCFSPanelController* fspanel;
//@property (readonly) VLCFSPanelController* draggablewvpanel;
- (void)changePlaylistState:(VLCPlaylistStateEvent)event;
......
......@@ -215,8 +215,12 @@ static const float f_min_window_height = 307.;
// Set that here as IB seems to be buggy
[self setContentMinSize:NSMakeSize(604., f_min_window_height)];
_fspanel = [[VLCFSPanelController alloc] init];
[_fspanel showWindow:self];
// _fspanel = [[VLCFSPanelController alloc] init];
// [_fspanel showWindow:self];
// MAYBE HAVE A LOOK
// _draggablewvpanel = [[VLCFSPanelController alloc] init];
// [_draggablewvpanel showWindow:self];
/* make sure we display the desired default appearance when VLC launches for the first time */
if (![defaults objectForKey:@"VLCFirstRun"]) {
......@@ -371,7 +375,7 @@ static const float f_min_window_height = 307.;
}
// Show split view and hide the video view
- (void)makeSplitViewVisible
- (void)makeSplitViewVisible//making the playlist view visible
{
[self setContentMinSize: NSMakeSize(604., f_min_window_height)];
......@@ -389,7 +393,8 @@ static const float f_min_window_height = 307.;
[_splitView setHidden:NO];
if (self.nativeFullscreenMode && [self fullscreen]) {
[self showControlsBar];
[self.fspanel setNonActive];
[self showFullscreenController];
// [self.fspanel setNonActive];
}
[self makeFirstResponder:_playlistScrollView];
......@@ -402,10 +407,10 @@ static const float f_min_window_height = 307.;
[_splitView setHidden:YES];
[self.videoView setHidden:NO];
if (self.nativeFullscreenMode && [self fullscreen]) {
[self hideControlsBar];
[self.fspanel setActive];
}
// if (self.nativeFullscreenMode && [self fullscreen]) {
// [self hideControlsBar];
// [self.fspanel setActive];
// }
if ([[self.videoView subviews] count] > 0)
[self makeFirstResponder: [[self.videoView subviews] firstObject]];
......@@ -470,6 +475,7 @@ static const float f_min_window_height = 307.;
[_playlistScrollView setHidden: NO];
[self.videoView setHidden: YES];
[self showControlsBar];
[self showFullscreenController];
}
}
......@@ -570,7 +576,11 @@ static const float f_min_window_height = 307.;
- (void)updateTimeSlider
{
[self.controlsBar updateTimeSlider];
[self.fspanel updatePositionAndTime];
// [self.fspanel updatePositionAndTime];
// msg_Err(getIntf(), "DAX WAS HERE #5 updateTimeSlider");
// [[[[VLCMain sharedInstance] voutProvider] fspanel] updatePositionAndTime];
// [self.draggablewvpanel updatePositionAndTime];
[self.draggableVideoController updatePositionAndTime];
[[[VLCMain sharedInstance] voutProvider] updateControlsBarsUsingBlock:^(VLCControlsBarCommon *controlsBar) {
[controlsBar updateTimeSlider];
......@@ -626,7 +636,12 @@ static const float f_min_window_height = 307.;
[o_window setTitle:aString];
}];
[self.fspanel setStreamTitle: aString];
// [self.fspanel setStreamTitle: aString];
// msg_Err(getIntf(), "DAX WAS HERE #6 setStreamTitle");
// [[[[VLCMain sharedInstance] voutProvider] fspanel] setStreamTitle: aString];
// [self.draggablewvpanel setStreamTitle: aString];
[self.draggableVideoController setStreamTitle: aString];
} else {
[self setTitle: _NS("VLC media player")];
[self setRepresentedURL: nil];
......@@ -658,8 +673,18 @@ static const float f_min_window_height = 307.;
}
[self updateTimeSlider];
if ([self.fspanel respondsToSelector:@selector(setSeekable:)])
[self.fspanel setSeekable: b_seekable];
// if ([self.fspanel respondsToSelector:@selector(setSeekable:)])
// [self.fspanel setSeekable: b_seekable];
// if ([self.draggablewvpanel respondsToSelector:@selector(setSeekable:)])
// [self.draggablewvpanel setSeekable: b_seekable];
if ([self.draggableVideoController respondsToSelector:@selector(setSeekable:)])
[self.draggableVideoController setSeekable: b_seekable];
// msg_Err(getIntf(), "DAX WAS HERE #7 setSeekable");
// if ([ [ [[VLCMain sharedInstance] voutProvider] fspanel] respondsToSelector:@selector(setSeekable:) ])
// [[[[VLCMain sharedInstance] voutProvider] fspanel] setSeekable: b_seekable];
PL_LOCK;
if ([[[[VLCMain sharedInstance] playlist] model] currentRootType] != ROOT_TYPE_PLAYLIST ||
......@@ -676,7 +701,12 @@ static const float f_min_window_height = 307.;
- (void)setPause
{
[self.controlsBar setPause];
[self.fspanel setPause];
// [self.fspanel setPause];
// msg_Err(getIntf(), "DAX WAS HERE #8");
// [[[[VLCMain sharedInstance] voutProvider] fspanel] setPause];
// [self.draggablewvpanel setPause];
[self.draggableVideoController setPause];
[[[VLCMain sharedInstance] voutProvider] updateControlsBarsUsingBlock:^(VLCControlsBarCommon *controlsBar) {
[controlsBar setPause];
......@@ -686,7 +716,14 @@ static const float f_min_window_height = 307.;
- (void)setPlay
{
[self.controlsBar setPlay];
[self.fspanel setPlay];
// [self.draggablewvpanel setPlay];
[self.draggableVideoController setPlay];
// [self.fspanel setPlay];
// [[[[VLCMain sharedInstance] voutProvider] fspanel] setPlay];
// msg_Err(getIntf(), "DAX WAS HERE #9");
[[[VLCMain sharedInstance] voutProvider] updateControlsBarsUsingBlock:^(VLCControlsBarCommon *controlsBar) {
[controlsBar setPlay];
......@@ -696,7 +733,14 @@ static const float f_min_window_height = 307.;
- (void)updateVolumeSlider
{
[(VLCMainWindowControlsBar *)[self controlsBar] updateVolumeSlider];
[self.fspanel setVolumeLevel:[[VLCCoreInteraction sharedInstance] volume]];
// [self.fspanel setVolumeLevel:[[VLCCoreInteraction sharedInstance] volume]];
// [self.draggablewvpanel setVolumeLevel:[[VLCCoreInteraction sharedInstance] volume]];
[self.draggableVideoController setVolumeLevel:[[VLCCoreInteraction sharedInstance] volume]];
// msg_Err(getIntf(), "DAX WAS HERE #10 updateVolumeSlider");
// [[[[VLCMain sharedInstance] voutProvider] fspanel] setVolumeLevel:[[VLCCoreInteraction sharedInstance] volume] ];
}
#pragma mark -
......@@ -741,15 +785,16 @@ static const float f_min_window_height = 307.;
[self setAlphaValue:1.0];
}
if (self.nativeFullscreenMode) {
if ([self hasActiveVideo] && [self fullscreen] && b_videoPlayback) {
[self hideControlsBar];
[self.fspanel setActive];
} else {
[self showControlsBar];
[self.fspanel setNonActive];
}
}
// if (self.nativeFullscreenMode) {
// if ([self hasActiveVideo] && [self fullscreen] && b_videoPlayback) {
// [self hideControlsBar];
// [self.fspanel setActive];
// } else {
// [self showControlsBar];
// [self.fspanel setNonActive];
// }
// }
}
#pragma mark -
......@@ -761,8 +806,14 @@ static const float f_min_window_height = 307.;
if ([currentWindow respondsToSelector:@selector(hasActiveVideo)] && [currentWindow hasActiveVideo]) {
if ([currentWindow respondsToSelector:@selector(fullscreen)] && [currentWindow fullscreen] && ![[currentWindow videoView] isHidden]) {
if ([[VLCMain sharedInstance] activeVideoPlayback])
[self.fspanel fadeIn];
// if ([[VLCMain sharedInstance] activeVideoPlayback])
// [self.showDraggableVideoController];
if ([[VLCMain sharedInstance] activeVideoPlayback])
[self showFullscreenController];
// if ([[VLCMain sharedInstance] activeVideoPlayback])
// [self.fspanel fadeIn];
}
}
......
......@@ -27,6 +27,8 @@
#import <vlc_vout_window.h>
#import "VLCKeyboardBacklightControl.h"
#import "VLCFSPanelController.h"
@class VLCControlsBarCommon;
@class VLCVideoWindowCommon;
@class VLCVoutView;
......@@ -34,6 +36,7 @@
@interface VLCVideoOutputProvider : NSObject
@property (readonly, nonatomic) NSInteger currentStatusWindowLevel;
@property (readonly) VLCFSPanelController* fspanel;
- (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition;
- (void)removeVoutForDisplay:(NSValue *)o_key;
......
......@@ -311,6 +311,8 @@ void WindowClose(vout_window_t *p_wnd)
voutView = [newVideoWindow videoView];
mainWindowHasVideo = YES;
isEmbedded = YES;
// _fspanel = [[VLCFSPanelController alloc] init];
// [_fspanel showWindow:self];
} else {
// setup detached window with controls
NSWindowController *o_controller = [[NSWindowController alloc] initWithWindowNibName:@"DetachedVideoWindow"];
......@@ -325,6 +327,8 @@ void WindowClose(vout_window_t *p_wnd)
[newVideoWindow setLevel:NSNormalWindowLevel];
voutView = [newVideoWindow videoView];
isEmbedded = NO;
// _fspanel = [[VLCFSPanelController alloc] init];
// [_fspanel showWindow:self];
}
}
......
......@@ -29,6 +29,8 @@
@class VLCControlsBarCommon;
@class VLCFSPanelController;
static const float f_min_video_height = 70.0;
/*****************************************************************************
......@@ -43,6 +45,7 @@ static const float f_min_video_height = 70.0;
@property (nonatomic, weak) IBOutlet VLCVoutView* videoView;
@property (nonatomic, weak) IBOutlet VLCControlsBarCommon* controlsBar;
@property (nonatomic, weak) IBOutlet VLCFSPanelController* draggableVideoController; //not sure why is it an IBOutlet, but so is controlsBar
@property (readonly) BOOL inFullscreenTransition;
@property (readonly) BOOL windowShouldExitFullscreenWhenFinished;
@property (readwrite, assign) NSRect previousSavedFrame;
......
......@@ -372,6 +372,16 @@
self.videoViewBottomConstraint.priority = 999;
}
- (void) hideDraggableVideoController
{
[self.draggableVideoController fadeOut];
}
- (void) showDraggableVideoController
{
[self.draggableVideoController fadeIn];
}
- (void)becomeKeyWindow
{
[super becomeKeyWindow];
......@@ -458,6 +468,7 @@
if (![_videoView isHidden]) {
[self hideControlsBar];
[self hideDraggableVideoController];
}
[self setMovableByWindowBackground: NO];
......@@ -507,6 +518,7 @@
if (![_videoView isHidden]) {
[self showControlsBar];
[self showDraggableVideoController];
}
[self setMovableByWindowBackground: YES];
......