Commit 721daa70 authored by David Fuhrmann's avatar David Fuhrmann

macosx: small cleanup in VLCWindow

parent 9e7821d9
...@@ -31,13 +31,13 @@ ...@@ -31,13 +31,13 @@
* Missing extension to NSWindow * Missing extension to NSWindow
*****************************************************************************/ *****************************************************************************/
@interface VLCWindow : NSWindow <NSWindowDelegate> @interface VLCWindow : NSWindow
{ {
BOOL b_canBecomeKeyWindow; BOOL b_canBecomeKeyWindow;
BOOL b_isset_canBecomeKeyWindow; BOOL b_isset_canBecomeKeyWindow;
BOOL b_canBecomeMainWindow; BOOL b_canBecomeMainWindow;
BOOL b_isset_canBecomeMainWindow; BOOL b_isset_canBecomeMainWindow;
NSViewAnimation *animation; NSViewAnimation *o_current_animation;
} }
@property (readwrite) BOOL canBecomeKeyWindow; @property (readwrite) BOOL canBecomeKeyWindow;
@property (readwrite) BOOL canBecomeMainWindow; @property (readwrite) BOOL canBecomeMainWindow;
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
{ {
self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag]; self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag];
if (self) { if (self) {
b_isset_canBecomeKeyWindow = NO;
/* we don't want this window to be restored on relaunch */ /* we don't want this window to be restored on relaunch */
if (!OSX_SNOW_LEOPARD) if (!OSX_SNOW_LEOPARD)
[self setRestorable:NO]; [self setRestorable:NO];
...@@ -127,20 +126,19 @@ ...@@ -127,20 +126,19 @@
[anim setUserInfo: callback]; [anim setUserInfo: callback];
@synchronized(self) { @synchronized(self) {
current_anim = self->animation; current_anim = self->o_current_animation;
if ([[[current_anim viewAnimations] objectAtIndex:0] objectForKey: NSViewAnimationEffectKey] == NSViewAnimationFadeOutEffect && [current_anim isAnimating]) { if ([[[current_anim viewAnimations] objectAtIndex:0] objectForKey: NSViewAnimationEffectKey] == NSViewAnimationFadeOutEffect && [current_anim isAnimating]) {
[anim release]; [anim release];
} else { } else {
if (current_anim) { if (current_anim) {
[current_anim stopAnimation]; [current_anim stopAnimation];
[anim setCurrentProgress:1.0-[current_anim currentProgress]]; [anim setCurrentProgress:1.0 - [current_anim currentProgress]];
[current_anim release]; [current_anim release];
} }
else else
[anim setCurrentProgress:1.0 - [self alphaValue]]; [anim setCurrentProgress:1.0 - [self alphaValue]];
self->animation = anim; self->o_current_animation = anim;
[self setDelegate: self];
[anim startAnimation]; [anim startAnimation];
} }
} }
...@@ -180,7 +178,7 @@ ...@@ -180,7 +178,7 @@
[anim setFrameRate:30]; [anim setFrameRate:30];
@synchronized(self) { @synchronized(self) {
current_anim = self->animation; current_anim = self->o_current_animation;
if ([[[current_anim viewAnimations] objectAtIndex:0] objectForKey: NSViewAnimationEffectKey] == NSViewAnimationFadeInEffect && [current_anim isAnimating]) { if ([[[current_anim viewAnimations] objectAtIndex:0] objectForKey: NSViewAnimationEffectKey] == NSViewAnimationFadeInEffect && [current_anim isAnimating]) {
[anim release]; [anim release];
...@@ -192,8 +190,7 @@ ...@@ -192,8 +190,7 @@
} }
else else
[anim setCurrentProgress:[self alphaValue]]; [anim setCurrentProgress:[self alphaValue]];
self->animation = anim; self->o_current_animation = anim;
[self setDelegate: self];
[self orderFront: sender]; [self orderFront: sender];
[anim startAnimation]; [anim startAnimation];
} }
...@@ -211,11 +208,6 @@ ...@@ -211,11 +208,6 @@
} }
} }
- (IBAction)fullscreen:(id)sender
{
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
@end @end
......
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