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

macosx: small cleanup in VLCWindow

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