Commit a1e22090 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed fspanel

parent dce6109d
......@@ -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">
......@@ -21,14 +21,14 @@
</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>
......
......@@ -147,6 +147,7 @@
- (void)setNativeVideoSize:(NSSize)size;
/* fullscreen handling */
- (void)showFullscreenController;
- (BOOL)isFullscreen;
- (void)lockFullscreenAnimation;
- (void)unlockFullscreenAnimation;
......@@ -157,8 +158,6 @@
- (void)hasBecomeFullscreen;
- (void)setFrameOnMainThread:(NSData*)packedargs;
- (id)fspanel;
@end
@interface VLCProgressBarGradientEffect : NSView {
......
......@@ -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 */
......
......@@ -178,16 +178,8 @@
- (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 );
}
[[VLCMain sharedInstance] showFullscreenController];
}
/* This routine is called repeatedly to fade in the window */
......@@ -429,7 +421,7 @@
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 );
*/
......@@ -531,32 +523,32 @@
- (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
......
......@@ -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;
......
......@@ -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];
......
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment