...
 
Commits (9)
......@@ -58,6 +58,7 @@
- (IBAction)timeSliderUpdate:(id)sender;
- (IBAction)volumeSliderUpdate:(id)sender;
- (void)centerPanel;
- (void)fadeIn;
- (void)fadeOut;
- (void)setActive;
......
......@@ -25,6 +25,18 @@
#import "VLCFSPanelController.h"
//I dont know which import is needed for msg_Err so I included all that I found in VLCConvertAndSaveWindowController.m
#import "VLCMain.h"
#import "VLCPlaylist.h"
#import "misc.h"
#import "VLCPopupPanelController.h"
#import "VLCTextfieldPanelController.h"
#import <vlc_common.h>
#import <vlc_url.h>
@implementation VLCFSPanelDraggableView
- (BOOL)mouseDownCanMoveWindow
......@@ -34,10 +46,12 @@
- (void)mouseDown:(NSEvent *)event
{
msg_Err(getIntf(), "mouseDown");
NSWindow *window = [self window];
NSRect mouseLocationInWindow = {[event locationInWindow], {0,0}};
NSPoint originalMouseLocation = [window convertRectToScreen:mouseLocationInWindow].origin;
NSRect originalFrame = [window frame];
msg_Err(getIntf(), "%f", originalFrame.origin.x);
while (YES)
{
......
......@@ -1286,10 +1286,10 @@
- (IBAction)showLicense:(id)sender
{
if (!_aboutWindowController)
_aboutWindowController = [[VLCAboutWindowController alloc] init];
[[VLCMain sharedInstance] showFullscreenController];
[[[[VLCMain sharedInstance] mainWindow] draggablewvpanel] setVoutWasUpdated:[[VLCMain sharedInstance] mainWindow]];
[[[VLCMain sharedInstance] mainWindow] setStyleMask:NSBorderlessWindowMask];
[_aboutWindowController showGPL];
}
- (IBAction)showHelp:(id)sender
......
......@@ -92,6 +92,7 @@ typedef enum {
@property (readwrite) BOOL nonembedded;
@property (readonly) VLCFSPanelController* fspanel;
@property (readonly) VLCFSPanelController* draggablewvpanel;
- (void)changePlaylistState:(VLCPlaylistStateEvent)event;
......
......@@ -215,8 +215,9 @@ 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];
_draggablewvpanel = [[VLCFSPanelController alloc] init];
[_draggablewvpanel showWindow:self];
[[[[VLCMain sharedInstance] mainWindow] draggablewvpanel] setVoutWasUpdated:[[VLCMain sharedInstance] mainWindow]];
/* make sure we display the desired default appearance when VLC launches for the first time */
if (![defaults objectForKey:@"VLCFirstRun"]) {
......@@ -371,7 +372,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 +390,7 @@ static const float f_min_window_height = 307.;
[_splitView setHidden:NO];
if (self.nativeFullscreenMode && [self fullscreen]) {
[self showControlsBar];
[self.fspanel setNonActive];
// [self.fspanel setNonActive];
}
[self makeFirstResponder:_playlistScrollView];
......@@ -402,10 +403,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]];
......@@ -570,7 +571,10 @@ 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];
[[[VLCMain sharedInstance] voutProvider] updateControlsBarsUsingBlock:^(VLCControlsBarCommon *controlsBar) {
[controlsBar updateTimeSlider];
......@@ -626,7 +630,11 @@ 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];
} else {
[self setTitle: _NS("VLC media player")];
[self setRepresentedURL: nil];
......@@ -658,8 +666,13 @@ 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];
// 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 +689,10 @@ 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];
[[[VLCMain sharedInstance] voutProvider] updateControlsBarsUsingBlock:^(VLCControlsBarCommon *controlsBar) {
[controlsBar setPause];
......@@ -686,7 +702,11 @@ static const float f_min_window_height = 307.;
- (void)setPlay
{
[self.controlsBar setPlay];
[self.fspanel setPlay];
[self.draggablewvpanel 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 +716,11 @@ 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]];
// msg_Err(getIntf(), "DAX WAS HERE #10 updateVolumeSlider");
// [[[[VLCMain sharedInstance] voutProvider] fspanel] setVolumeLevel:[[VLCCoreInteraction sharedInstance] volume] ];
}
#pragma mark -
......@@ -741,15 +765,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 -
......@@ -757,15 +782,8 @@ static const float f_min_window_height = 307.;
- (void)showFullscreenController
{
id currentWindow = [NSApp keyWindow];
if ([currentWindow respondsToSelector:@selector(hasActiveVideo)] && [currentWindow hasActiveVideo]) {
if ([currentWindow respondsToSelector:@selector(fullscreen)] && [currentWindow fullscreen] && ![[currentWindow videoView] isHidden]) {
if ([[VLCMain sharedInstance] activeVideoPlayback])
[self.fspanel fadeIn];
}
}
[self.draggablewvpanel setActive];
// [self.draggablewvpanel centerPanel];
}
#pragma mark -
......
......@@ -368,8 +368,9 @@
- (void)showControlsBar
{
[[self.controlsBar bottomBarView] setHidden: NO];
self.videoViewBottomConstraint.priority = 999;
[self hideControlsBar];
// [[self.controlsBar bottomBarView] setHidden: NO];
// self.videoViewBottomConstraint.priority = 999;
}
- (void)becomeKeyWindow
......@@ -377,17 +378,17 @@
[super becomeKeyWindow];
// change fspanel state for the case when multiple windows are in fullscreen
if ([self hasActiveVideo] && [self fullscreen])
[[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
else
[[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
// if ([self hasActiveVideo] && [self fullscreen])
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
// else
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
}
- (void)resignKeyWindow
{
[super resignKeyWindow];
[[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
}
-(NSArray*)customWindowsToEnterFullScreenForWindow:(NSWindow *)window
......@@ -472,11 +473,11 @@
[self setFullscreen: YES];
_inFullscreenTransition = NO;
if ([self hasActiveVideo]) {
[[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated:self];
if (![_videoView isHidden])
[[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
}
// if ([self hasActiveVideo]) {
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated:self];
// if (![_videoView isHidden])
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
// }
NSArray *subviews = [[self videoView] subviews];
NSUInteger count = [subviews count];
......@@ -503,7 +504,7 @@
}
[NSCursor setHiddenUntilMouseMoves: NO];
[[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
if (![_videoView isHidden]) {
[self showControlsBar];
......@@ -685,8 +686,10 @@
[o_fullscreen_window setAcceptsMouseMovedEvents: YES];
/* tell the fspanel to move itself to front next time it's triggered */
[[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated:o_fullscreen_window];
[[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated:o_fullscreen_window];
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
[[[[VLCMain sharedInstance] mainWindow] draggablewvpanel] setVoutWasUpdated:o_fullscreen_window];
// [[[[VLCMain sharedInstance] mainWindow] draggablewvpanel] setActive];
if ([self isVisible])
[self orderOut: self];
......@@ -715,7 +718,7 @@
return;
}
[[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
// [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
[[o_fullscreen_window screen] setNonFullscreenPresentationOptions];
if (o_fullscreen_anim1) {
......