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

Felix Paul Kühne git at videolan.org
Wed Dec 21 00:56:51 CET 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Dec 21 00:37:33 2011 +0100| [6d2b10ba8d689659135928c8d168198cfcfae725] | committer: Felix Paul Kühne

macosx: save a few objc selector lookups

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

 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 5081808..6a8fde1 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