[vlc-commits] macosx: remove the window's resize button when VLC is linked against the 10 .7 SDK, but keep it as an empty view when linked against an older SDK but still running on Lion (refs #5742)
Felix Paul Kühne
git at videolan.org
Fri Dec 30 12:40:21 CET 2011
vlc/vlc-1.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Dec 29 20:50:44 2011 +0100| [0c5ba6a21cfa18c21adec5e44a1be3ed7b0d6315] | committer: Jean-Baptiste Kempf
macosx: remove the window's resize button when VLC is linked against the 10.7 SDK, but keep it as an empty view when linked against an older SDK but still running on Lion (refs #5742)
(cherry picked from commit 2e57a2c0ffe5cd283d4f909e4aaf09bbc3a004af)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=0c5ba6a21cfa18c21adec5e44a1be3ed7b0d6315
---
.../macosx/Resources/English.lproj/MainMenu.xib | 26 ++++++++++----------
modules/gui/macosx/MainWindow.m | 7 ++++-
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index d540d7e..d401d43 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -21,14 +21,14 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="4680"/>
- <integer value="915"/>
- <integer value="4758"/>
<integer value="1617"/>
- <integer value="2730"/>
<integer value="29"/>
+ <integer value="2730"/>
<integer value="4722"/>
+ <integer value="4758"/>
<integer value="4596"/>
+ <integer value="915"/>
+ <integer value="4756"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -7408,20 +7408,20 @@ LCAuLi4</string>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">o_resize_view</string>
- <reference key="source" ref="498338108"/>
- <reference key="destination" ref="884724451"/>
- </object>
- <int key="connectionID">4841</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="302568132"/>
<reference key="destination" ref="498338108"/>
</object>
<int key="connectionID">4842</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">o_resize_view</string>
+ <reference key="source" ref="498338108"/>
+ <reference key="destination" ref="884724451"/>
+ </object>
+ <int key="connectionID">4843</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -11852,7 +11852,7 @@ LCAuLi4</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">4842</int>
+ <int key="maxID">4843</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 3b21965..53748e2 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -76,7 +76,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
#ifdef MAC_OS_X_VERSION_10_7
styleMask = NSBorderlessWindowMask | NSResizableWindowMask;
- [o_resize_view removeFromSuperviewWithoutNeedingDisplay];
#else
styleMask = NSBorderlessWindowMask;
#endif
@@ -414,6 +413,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_video_view setFrame: winrect];
previousSavedFrame = winrect;
+ if (OSX_LION)
+ [o_resize_view setImage: NULL];
+
+ if ([self styleMask] & NSResizableWindowMask)
+ [o_resize_view removeFromSuperviewWithoutNeedingDisplay];
+
[self display];
}
else
More information about the vlc-commits
mailing list