[vlc-commits] macosx: small cleanup in VLCWindow

David Fuhrmann git at videolan.org
Fri Sep 14 20:10:35 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Sep 14 18:55:49 2012 +0200| [721daa7061443c5a050af71f020ad39fc3e6e8cb] | committer: David Fuhrmann

macosx: small cleanup in VLCWindow

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=721daa7061443c5a050af71f020ad39fc3e6e8cb
---

 modules/gui/macosx/Windows.h |    4 ++--
 modules/gui/macosx/Windows.m |   18 +++++-------------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/modules/gui/macosx/Windows.h b/modules/gui/macosx/Windows.h
index d0c4e77..655658c 100644
--- a/modules/gui/macosx/Windows.h
+++ b/modules/gui/macosx/Windows.h
@@ -31,13 +31,13 @@
  *  Missing extension to NSWindow
  *****************************************************************************/
 
- at interface VLCWindow : NSWindow <NSWindowDelegate>
+ at 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;
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 8cb1350..79e4b85 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -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
 
 



More information about the vlc-commits mailing list