[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
Wed Dec 28 01:39:50 CET 2011
vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Dec 24 01:59:36 2011 +0100| [42fad58dec1f278366d017432287e34dc61aa672] | committer: Jean-Baptiste Kempf
macosx: hide the titlebar's fullscreen button if we don't use Lion's fullscreen mode
(cherry picked from commit 64280ec9ddfce2cf6e99e00d4b7087b1e2313c7e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=42fad58dec1f278366d017432287e34dc61aa672
---
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 c8bdfee..c8e4009 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