[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
Thu Dec 29 22:01:44 CET 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Dec 29 20:50:44 2011 +0100| [2e57a2c0ffe5cd283d4f909e4aaf09bbc3a004af] | committer: Felix Paul Kühne

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)

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

 .../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 baaf694..c5330bc 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