]> git.sesse.net Git - vlc/commitdiff
macosx: fixed fspanel
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 9 Aug 2011 23:11:44 +0000 (01:11 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 9 Aug 2011 23:11:44 +0000 (01:11 +0200)
extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.m
modules/gui/macosx/fspanel.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/vout.m

index 347e617bd0843482fb27b14ee9b33de8e7f8253a..954cce460fde5e050eee6459c31a4f61cc2b915e 100644 (file)
@@ -2,10 +2,10 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
   <data>
     <int key="IBDocument.SystemTarget">1040</int>
-    <string key="IBDocument.SystemVersion">11A511</string>
+    <string key="IBDocument.SystemVersion">11C35</string>
     <string key="IBDocument.InterfaceBuilderVersion">851</string>
-    <string key="IBDocument.AppKitVersion">1138</string>
-    <string key="IBDocument.HIToolboxVersion">566.00</string>
+    <string key="IBDocument.AppKitVersion">1138.15</string>
+    <string key="IBDocument.HIToolboxVersion">567.00</string>
     <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
       <bool key="EncodedWithXMLCoder">YES</bool>
       <object class="NSArray" key="dict.sortedKeys">
     </object>
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
-      <integer value="4596"/>
-      <integer value="915"/>
-      <integer value="1617"/>
       <integer value="2730"/>
-      <integer value="4722"/>
-      <integer value="283"/>
+      <integer value="915"/>
       <integer value="2"/>
+      <integer value="283"/>
+      <integer value="1617"/>
       <integer value="334"/>
+      <integer value="4722"/>
+      <integer value="4596"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -10235,6 +10235,7 @@ LCAuLi4</string>
           <string>2769.IBPluginDependency</string>
           <string>2769.IBWindowTemplateEditedContentRect</string>
           <string>2769.ImportedFromIB2</string>
+          <string>2769.NSWindowTemplate.visibleAtLaunch</string>
           <string>2770.IBPluginDependency</string>
           <string>2770.ImportedFromIB2</string>
           <string>2789.IBPluginDependency</string>
@@ -10981,6 +10982,7 @@ LCAuLi4</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <string>{{340, 658}, {549, 87}}</string>
           <boolean value="YES"/>
+          <boolean value="NO"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
index c8176831107b8acd09b37141e7223344428eb91c..b6653e5303c947c28eb1f703a6d1cdd7c1585fdf 100644 (file)
 - (void)setNativeVideoSize:(NSSize)size;
 
 /* fullscreen handling */
+- (void)showFullscreenController;
 - (BOOL)isFullscreen;
 - (void)lockFullscreenAnimation;
 - (void)unlockFullscreenAnimation;
 - (void)hasBecomeFullscreen;
 - (void)setFrameOnMainThread:(NSData*)packedargs;
 
-- (id)fspanel;
-
 @end
 
 @interface VLCProgressBarGradientEffect : NSView {
index cd389985cee28be32cef70bcd790ff7d7bbff433..3a59d4d7b3ece9bb6314603a5da21b4869fbde12 100644 (file)
@@ -218,10 +218,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
     o_temp_view = [[NSView alloc] init];
     [o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
 
-    /* reset the interface */
-    [self updateVolumeSlider];
-    [self updateTimeSlider];
-
     /* create the sidebar */
     o_sidebaritems = [[NSMutableArray alloc] init];
     SideBarItem *libraryItem = [SideBarItem itemWithTitle:_NS("LIBRARY") identifier:@"library"];
@@ -646,8 +642,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         int i_volume_step = 0;
         i_volume_step = config_GetInt( VLCIntf->p_libvlc, "volume-step" );
         [o_volume_sld setFloatValue: (float)i_lastShownVolume / i_volume_step];
-//        if ([o_fspanel respondsToSelector:@selector(setVolumeLevel:)])
-//            [o_fspanel setVolumeLevel: (float)i_lastShownVolume / i_volume_step];
+        [o_fspanel setVolumeLevel: (float)i_lastShownVolume / i_volume_step];
     }
 }
 
@@ -855,6 +850,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 #pragma mark -
 #pragma mark Fullscreen support
+- (void)showFullscreenController
+{
+    if (b_fullscreen)
+        [o_fspanel fadeIn];
+}
+
 - (BOOL)isFullscreen
 {
     return b_fullscreen;
@@ -1304,11 +1305,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
     }
 }
 
-- (id)fspanel
-{
-    return o_fspanel;
-}
-
 #pragma mark -
 #pragma mark Side Bar Data handling
 /* taken under BSD-new from the PXSourceList sample project, adapted for VLC */
index b16df3ca2582163d78d8c453ff253c3e6f0bc154..7802af910c78011dfbae4d4aff91873f55270439 100644 (file)
 
 - (void)setActive:(id)noData
 {
-    vout_thread_t *p_vout = getVout();
-    if (p_vout)
-    {
-        if (var_GetBool( p_vout, "fullscreen" ))
-        {
-            b_nonActive = NO;
-            [self fadeIn];
-        }
-        vlc_object_release( p_vout );
-    }
+    b_nonActive = NO;
+    [[VLCMain sharedInstance] showFullscreenController];
 }
 
 /* This routine is called repeatedly to fade in the window */
     addButton( o_play, @"fs_play"          , @"fs_play_highlight"         , 267, 10, play );
     addButton( o_fwd, @"fs_forward"       , @"fs_forward_highlight"      , 313, 14, forward );
     addButton( o_next, @"fs_skip_next"     , @"fs_skip_next_highlight"    , 365, 15, next );
-    addButton( o_fullscreen, @"fs_exit_fullscreen", @"fs_exit_fullscreen_hightlight", 507, 13, windowAction );
+    addButton( o_fullscreen, @"fs_exit_fullscreen", @"fs_exit_fullscreen_hightlight", 507, 13, toggleFullscreen );
 /*
     addButton( o_button, @"image (off state)", @"image (on state)", 38, 51, something );
  */
 
 - (IBAction)play:(id)sender
 {
-    [[[VLCMain sharedInstance] controls] play: sender];
+    [[VLCCoreInteraction sharedInstance] play];
 }
 
 - (IBAction)forward:(id)sender
 {
-    [[[VLCMain sharedInstance] controls] forward: sender];
+    [[VLCCoreInteraction sharedInstance] forward];
 }
 
 - (IBAction)backward:(id)sender
 {
-    [[[VLCMain sharedInstance] controls] backward: sender];
+    [[VLCCoreInteraction sharedInstance] backward];
 }
 
 - (IBAction)prev:(id)sender
 {
-    [[[VLCMain sharedInstance] controls] prev: sender];
+    [[VLCCoreInteraction sharedInstance] previous];
 }
 
 - (IBAction)next:(id)sender
 {
-    [[[VLCMain sharedInstance] controls] next: sender];
+    [[VLCCoreInteraction sharedInstance] next];
 }
 
-- (IBAction)windowAction:(id)sender
+- (IBAction)toggleFullscreen:(id)sender
 {
-    [[[VLCMain sharedInstance] controls] windowAction: sender];
+    [[VLCCoreInteraction sharedInstance] toggleFullscreen];
 }
 
 - (IBAction)fsTimeSliderUpdate:(id)sender
index f7187cf2c67363c747e384a24e611c4bd2e752e9..917dc6dc048196d9d49c6f1fefb9f2f1fac9c1f1 100644 (file)
@@ -183,6 +183,7 @@ struct intf_sys_t
 - (void)playlistUpdated;
 - (void)updateInfoandMetaPanel;
 - (void)updateMainWindow;
+- (void)showFullscreenController;
 - (void)updateDelays;
 - (void)initStrings;
 - (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename;
index 4fa787df3d937ab7846b0c3e7c77e359c8d98bf4..7e643dc388d62ec84d5b312a5322a6b34934b575 100644 (file)
@@ -609,6 +609,8 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     [self _removeOldPreferences];
 
+    [o_mainwindow updateTimeSlider];
+    [o_mainwindow updateVolumeSlider];
     [o_mainwindow makeKeyAndOrderFront: self];
 
     /* Handle sleep notification */
@@ -1259,6 +1261,11 @@ unsigned int CocoaKeyToVLC( unichar i_key )
     [o_mainwindow updateWindow];
 }
 
+- (void)showFullscreenController
+{
+    [o_mainwindow showFullscreenController];
+}
+
 - (void)updateDelays
 {
     [[VLCTrackSynchronization sharedInstance] performSelectorOnMainThread: @selector(updateValues) withObject: nil waitUntilDone:NO];
index 42beb510914e8d081ac832c82a39ef894263f4a8..22b5cbd602e54bc7a6c67e0b0837c71fd4ad4c8b 100644 (file)
@@ -32,7 +32,6 @@
 #import <string.h>
 
 #import "intf.h"
-#import "fspanel.h"
 #import "vout.h"
 #import "CoreInteraction.h"
 #import "MainMenu.h"
@@ -367,9 +366,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
         {
             var_SetCoords( p_vout, "mouse-moved", ((int)ml.x), ((int)ml.y) );
         }
-//        if( var_GetBool( p_vout, "fullscreen") )
-            [[[VLCMainWindow sharedInstance] fspanel] fadeIn];
         vlc_object_release( p_vout );
+        [[VLCMain sharedInstance] showFullscreenController];
     }
 
     [super mouseMoved: o_event];