[vlc-commits] macosx: hide the titlebar's fullscreen button if we don't use Lion' s fullscreen mode

Felix Paul Kühne git at videolan.org
Sat Dec 24 01:59:46 CET 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Dec 24 01:59:36 2011 +0100| [64280ec9ddfce2cf6e99e00d4b7087b1e2313c7e] | committer: Felix Paul Kühne

macosx: hide the titlebar's fullscreen button if we don't use Lion's fullscreen mode

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

 modules/gui/macosx/MainWindow.h      |    1 -
 modules/gui/macosx/MainWindow.m      |    3 +++
 modules/gui/macosx/MainWindowTitle.h |    1 +
 modules/gui/macosx/MainWindowTitle.m |    5 +++++
 4 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.h b/modules/gui/macosx/MainWindow.h
index f0a67c6..69f997f 100644
--- a/modules/gui/macosx/MainWindow.h
+++ b/modules/gui/macosx/MainWindow.h
@@ -30,7 +30,6 @@
 #import <vlc_input.h>
 #import "misc.h"
 #import "fspanel.h"
-#import "MainWindowTitle.h"
 
 @interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate> {
     IBOutlet id o_play_btn;
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 315cea5..fb3ff65 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -277,6 +277,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
         [o_fullscreen_btn removeFromSuperviewWithoutNeedingDisplay];
     }
+    else
+        [o_titlebar_view setFullscreenButtonHidden: YES];
+
     if (OSX_LION)
     {
         /* the default small size of the search field is slightly different on Lion, let's work-around that */
diff --git a/modules/gui/macosx/MainWindowTitle.h b/modules/gui/macosx/MainWindowTitle.h
index 0b9094e..d48317e 100644
--- a/modules/gui/macosx/MainWindowTitle.h
+++ b/modules/gui/macosx/MainWindowTitle.h
@@ -38,5 +38,6 @@
 
 - (IBAction)buttonAction:(id)sender;
 - (void)setWindowTitle:(NSString *)title;
+- (void)setFullscreenButtonHidden:(BOOL)b_value;
 
 @end
diff --git a/modules/gui/macosx/MainWindowTitle.m b/modules/gui/macosx/MainWindowTitle.m
index 17bb896..76a9ef6 100644
--- a/modules/gui/macosx/MainWindowTitle.m
+++ b/modules/gui/macosx/MainWindowTitle.m
@@ -67,4 +67,9 @@
     [o_title_lbl setStringValue: title];
 }
 
+- (void)setFullscreenButtonHidden:(BOOL)b_value
+{
+    [o_fullscreen_btn setHidden: b_value];
+}
+
 @end



More information about the vlc-commits mailing list