[vlc-commits] macosx: save a few objc selector lookups

Felix Paul Kühne git at videolan.org
Wed Dec 21 02:30:25 CET 2011


vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Dec 21 00:37:33 2011 +0100| [dbb7c7180ed3ac587a6139faf5eb50965f476eac] | committer: Jean-Baptiste Kempf

macosx: save a few objc selector lookups
(cherry picked from commit 6d2b10ba8d689659135928c8d168198cfcfae725)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/macosx/MainWindow.m |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index bebb36e..f87ccf4 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -896,21 +896,26 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)setVideoplayEnabled
 {
+    BOOL b_videoPlayback = [[VLCMain sharedInstance] activeVideoPlayback];
+
     if (!b_nonembedded)
-        [o_playlist_btn setEnabled: [[VLCMain sharedInstance] activeVideoPlayback]];
+        [o_playlist_btn setEnabled: b_videoPlayback];
     else
     {
         [o_playlist_btn setEnabled: NO];
-        if (![[VLCMain sharedInstance] activeVideoPlayback])
+        if (!b_videoPlayback)
             [o_nonembedded_window orderOut: nil];
     }
-    if( OSX_LION )
+    if( OSX_LION && b_nativeFullscreenMode )
     {
-        if( [NSApp presentationOptions] | NSApplicationPresentationFullScreen )
-        {
-            [o_bottombar_view setHidden: [[VLCMain sharedInstance] activeVideoPlayback]];
-        }
-        [o_bottombar_view setHidden: NO];
+        if( [NSApp presentationOptions] == NSApplicationPresentationFullScreen )
+            [o_bottombar_view setHidden: b_videoPlayback];
+        else
+            [o_bottombar_view setHidden: NO];
+    }
+    else
+    {
+        [o_fullscreen_btn setEnabled: b_videoPlayback];
     }
 }
 



More information about the vlc-commits mailing list