Commit 9b11fa7e authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: move from manual to automatic property synthesis

parent 0b9b7eab
......@@ -93,18 +93,12 @@ The class is not thread safe
NSDictionary* _cookieToButtonMapping;
CFRunLoopSourceRef eventSource;
BOOL _openInExclusiveMode;
BOOL _simulatePlusMinusHold;
BOOL _processesBacklog;
/* state for simulating plus/minus hold */
BOOL lastEventSimulatedHold;
AppleRemoteEventIdentifier lastPlusMinusEvent;
NSTimeInterval lastPlusMinusEventTime;
int remoteId;
unsigned int _clickCountEnabledButtons;
NSTimeInterval _maxClickTimeDifference;
NSTimeInterval lastClickCountEventTime;
AppleRemoteEventIdentifier lastClickCountEvent;
unsigned int eventClickCount;
......
......@@ -64,8 +64,6 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
@implementation AppleRemote
@synthesize openInExclusiveMode = _openInExclusiveMode, clickCountEnabledButtons = _clickCountEnabledButtons, maximumClickCountTimeDifference = _maxClickTimeDifference, processesBacklog=_processesBacklog, simulatesPlusMinusHold = _simulatePlusMinusHold;
#pragma public interface
static AppleRemote *_o_sharedInstance = nil;
......@@ -107,8 +105,8 @@ static AppleRemote *_o_sharedInstance = nil;
_cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping];
/* defaults */
_simulatePlusMinusHold = YES;
_maxClickTimeDifference = DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE;
_simulatesPlusMinusHold = YES;
_maximumClickCountTimeDifference = DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE;
}
return _o_sharedInstance;
......@@ -361,7 +359,7 @@ static AppleRemote* sharedInstance=nil;
}
[self performSelector: @selector(executeClickCountEvent:)
withObject: [NSArray arrayWithObjects: eventNumber, timeNumber, nil]
afterDelay: _maxClickTimeDifference];
afterDelay: _maximumClickCountTimeDifference];
} else {
[delegate appleRemoteButton:event pressedDown: pressedDown clickCount:1];
}
......
......@@ -54,11 +54,6 @@
@implementation BWQuincyManager
@synthesize submissionURL = _submissionURL;
@synthesize companyName = _companyName;
@synthesize appIdentifier = _appIdentifier;
@synthesize autoSubmitCrashReport = _autoSubmitCrashReport;
+ (BWQuincyManager *)sharedQuincyManager {
static BWQuincyManager *quincyManager = nil;
......
......@@ -36,7 +36,6 @@
@interface VLCControlsBarCommon : NSObject
{
IBOutlet id o_bottombar_view;
IBOutlet VLCDragDropView *o_drop_view;
IBOutlet id o_play_btn;
......@@ -54,7 +53,7 @@
IBOutlet id o_resize_view;
}
@property (readonly) id bottomBarView;
@property (readwrite, strong) IBOutlet id bottomBarView;
@property (readonly) BOOL darkInterface;
@property (readonly) BOOL nativeFullscreenMode;
......
......@@ -52,8 +52,6 @@
@implementation VLCControlsBarCommon
@synthesize bottomBarView=o_bottombar_view;
- (void)awakeFromNib
{
_darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
......@@ -87,7 +85,7 @@
[[o_fullscreen_btn cell] accessibilitySetOverrideValue:[o_fullscreen_btn toolTip] forAttribute:NSAccessibilityTitleAttribute];
if (!_darkInterface) {
[o_bottombar_view setImagesLeft: imageFromRes(@"bottom-background") middle: imageFromRes(@"bottom-background") right: imageFromRes(@"bottom-background")];
[self.bottomBarView setImagesLeft: imageFromRes(@"bottom-background") middle: imageFromRes(@"bottom-background") right: imageFromRes(@"bottom-background")];
[o_bwd_btn setImage: imageFromRes(@"backward-3btns")];
[o_bwd_btn setAlternateImage: imageFromRes(@"backward-3btns-pressed")];
......@@ -104,7 +102,7 @@
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-one-button")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-one-button-pressed")];
} else {
[o_bottombar_view setImagesLeft: imageFromRes(@"bottomdark-left") middle: imageFromRes(@"bottom-background_dark") right: imageFromRes(@"bottomdark-right")];
[self.bottomBarView setImagesLeft: imageFromRes(@"bottomdark-left") middle: imageFromRes(@"bottom-background_dark") right: imageFromRes(@"bottomdark-right")];
[o_bwd_btn setImage: imageFromRes(@"backward-3btns-dark")];
[o_bwd_btn setAlternateImage: imageFromRes(@"backward-3btns-dark-pressed")];
......@@ -154,7 +152,7 @@
if (!OSX_SNOW_LEOPARD)
[o_resize_view setImage: NULL];
if ([[o_bottombar_view window] styleMask] & NSResizableWindowMask)
if ([[self.bottomBarView window] styleMask] & NSResizableWindowMask)
[o_resize_view removeFromSuperviewWithoutNeedingDisplay];
......@@ -180,7 +178,7 @@
- (CGFloat)height
{
return [o_bottombar_view frame].size.height;
return [self.bottomBarView frame].size.height;
}
- (void)toggleForwardBackwardMode:(BOOL)b_alt
......@@ -707,7 +705,7 @@ else \
}
}
[o_bottombar_view setNeedsDisplay:YES];
[self.bottomBarView setNeedsDisplay:YES];
}
- (void)removeEffectsButton:(BOOL)b_fast
......@@ -756,7 +754,7 @@ else \
}
}
[o_bottombar_view setNeedsDisplay:YES];
[self.bottomBarView setNeedsDisplay:YES];
}
- (void)toggleJumpButtons
......@@ -861,11 +859,11 @@ else \
// wait until the animation is done, if displayed
if (b_fast) {
[o_bottombar_view addSubview:o_prev_btn];
[o_bottombar_view addSubview:o_next_btn];
[self.bottomBarView addSubview:o_prev_btn];
[self.bottomBarView addSubview:o_next_btn];
} else {
[o_bottombar_view performSelector:@selector(addSubview:) withObject:o_prev_btn afterDelay:.2];
[o_bottombar_view performSelector:@selector(addSubview:) withObject:o_next_btn afterDelay:.2];
[self.bottomBarView performSelector:@selector(addSubview:) withObject:o_prev_btn afterDelay:.2];
[self.bottomBarView performSelector:@selector(addSubview:) withObject:o_next_btn afterDelay:.2];
}
[self toggleForwardBackwardMode: YES];
......@@ -938,7 +936,7 @@ else \
[self toggleForwardBackwardMode: NO];
[o_bottombar_view setNeedsDisplay:YES];
[self.bottomBarView setNeedsDisplay:YES];
}
- (void)togglePlaymodeButtons
......
......@@ -46,15 +46,9 @@
@interface VLCConvertAndSave()
{
NSString * _MRL;
NSString * _outputDestination;
NSArray * _profileNames;
NSArray * _profileValueList;
NSArray * _videoCodecs;
NSArray * _audioCodecs;
NSArray * _subsCodecs;
NSMutableArray * _currentProfile;
NSArray *_videoCodecs;
NSArray *_audioCodecs;
NSArray *_subsCodecs;
BOOL b_streaming;
}
......@@ -71,10 +65,6 @@
@implementation VLCConvertAndSave
@synthesize MRL=_MRL, outputDestination=_outputDestination, profileNames=_profileNames, profileValueList=_profileValueList, currentProfile=_currentProfile;
@synthesize vidBitrate, vidFramerate, audBitrate, audChannels;
static VLCConvertAndSave *_o_sharedInstance = nil;
#pragma mark -
......
......@@ -41,7 +41,6 @@
NSMutableDictionary *p_extDict;
BOOL b_unloading; ///< Work around threads + emit issues, see isUnloading
BOOL b_failed; ///< Flag set to true if we could not load the module
id <ExtensionsDelegate> delegate;
......@@ -52,8 +51,6 @@
static ExtensionsManager* instance = nil;
@synthesize isUnloading = b_unloading;
+ (ExtensionsManager *)getInstance:(intf_thread_t *)_p_intf
{
if (!instance)
......@@ -70,7 +67,7 @@ static ExtensionsManager* instance = nil;
p_extDict = [[NSMutableDictionary alloc] init];
b_unloading = false;
_isUnloading = false;
b_failed = false;
delegate = nil;
......@@ -203,7 +200,7 @@ static ExtensionsManager* instance = nil;
[delegate extensionsUpdated];
return false;
}
b_unloading = false;
_isUnloading = false;
}
b_failed = false;
[delegate extensionsUpdated];
......@@ -214,7 +211,7 @@ static ExtensionsManager* instance = nil;
{
if (!p_extensions_manager)
return;
b_unloading = true;
_isUnloading = true;
module_unneed(p_extensions_manager, p_extensions_manager->p_module);
vlc_object_release(p_extensions_manager);
p_extensions_manager = NULL;
......@@ -336,7 +333,7 @@ static ExtensionsManager* instance = nil;
- (BOOL)cannotLoad
{
return b_unloading || b_failed;
return self.isUnloading || b_failed;
}
@end
......@@ -725,7 +725,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
{
BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-effects-button");
config_PutInt(VLCIntf, "macosx-show-effects-button", b_value);
[[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleEffectsButton];
[(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleEffectsButton];
[o_mi_toggleEffectsButton setState: b_value];
}
......@@ -734,7 +734,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-playback-buttons");
config_PutInt(VLCIntf, "macosx-show-playback-buttons", b_value);
[[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleJumpButtons];
[(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleJumpButtons];
[[[VLCMain sharedInstance] voutController] updateWindowsUsingBlock:^(VLCVideoWindowCommon *o_window) {
[[o_window controlsBar] toggleForwardBackwardMode: b_value];
}];
......@@ -746,7 +746,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
{
BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-playmode-buttons");
config_PutInt(VLCIntf, "macosx-show-playmode-buttons", b_value);
[[[[VLCMain sharedInstance] mainWindow] controlsBar] togglePlaymodeButtons];
[(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] togglePlaymodeButtons];
[o_mi_togglePlaymodeButtons setState: b_value];
}
......
......@@ -86,9 +86,7 @@ typedef enum {
@property (readonly) BOOL nativeFullscreenMode;
@property (readwrite) BOOL nonembedded;
@property (readonly) VLCFSPanel* fsPanel;
- (VLCMainWindowControlsBar *)controlsBar;
@property (readonly) VLCFSPanel* fspanel;
- (void)changePlaylistState:(VLCPlaylistStateEvent)event;
......
......@@ -48,9 +48,6 @@
@interface VLCMainWindow() <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate>
{
VLCFSPanel *o_fspanel;
BOOL b_nativeFullscreenMode;
BOOL b_video_playback_enabled;
BOOL b_dropzone_active;
BOOL b_splitview_removed;
......@@ -62,7 +59,6 @@
NSMutableArray *o_sidebaritems;
/* this is only true, when we have NO video playing inside the main window */
BOOL b_nonembedded;
BOOL b_podcastView_displayed;
......@@ -81,10 +77,6 @@ static const float f_min_window_height = 307.;
@implementation VLCMainWindow
@synthesize nativeFullscreenMode=b_nativeFullscreenMode;
@synthesize nonembedded=b_nonembedded;
@synthesize fsPanel=o_fspanel;
static VLCMainWindow *_o_sharedInstance = nil;
+ (VLCMainWindow *)sharedInstance
......@@ -177,10 +169,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setFrameAutosaveName:@"mainwindow"];
/* setup the styled interface */
b_nativeFullscreenMode = NO;
_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#endif
[self useOptimizedDrawing: YES];
......@@ -204,9 +196,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_podcast_unsubscribe_cancel_btn setTitle: _NS("Cancel")];
/* interface builder action */
CGFloat f_threshold_height = f_min_video_height + [o_controls_bar height];
CGFloat f_threshold_height = f_min_video_height + [self.controlsBar height];
if (self.darkInterface)
f_threshold_height += [o_titlebar_view frame].size.height;
f_threshold_height += [self.titlebarView frame].size.height;
if ([[self contentView] frame].size.height < f_threshold_height)
b_splitviewShouldBeHidden = YES;
......@@ -215,7 +207,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setAcceptsMouseMovedEvents: YES];
// Set that here as IB seems to be buggy
if (self.darkInterface)
[self setContentMinSize:NSMakeSize(604., f_min_window_height + [o_titlebar_view frame].size.height)];
[self setContentMinSize:NSMakeSize(604., f_min_window_height + [self.titlebarView frame].size.height)];
else
[self setContentMinSize:NSMakeSize(604., f_min_window_height)];
......@@ -237,10 +229,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* reload the sidebar */
[self reloadSidebar];
o_fspanel = [[VLCFSPanel alloc] initWithContentRect:NSMakeRect(110.,267.,549.,87.)
styleMask:NSTexturedBackgroundWindowMask
backing:NSBackingStoreBuffered
defer:YES];
_fspanel = [[VLCFSPanel alloc] initWithContentRect:NSMakeRect(110.,267.,549.,87.)
styleMask:NSTexturedBackgroundWindowMask
backing:NSBackingStoreBuffered
defer:YES];
/* make sure we display the desired default appearance when VLC launches for the first time */
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
......@@ -251,7 +243,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
for (NSUInteger x = 0; x < i_sidebaritem_count; x++)
[o_sidebar_view expandItem: [o_sidebaritems objectAtIndex:x] expandChildren: YES];
[o_fspanel center];
[_fspanel center];
NSAlert *albumArtAlert = [NSAlert alertWithMessageText:_NS("Check for album art and metadata?") defaultButton:_NS("Enable Metadata Retrieval") alternateButton:_NS("No, Thanks") otherButton:nil informativeTextWithFormat:@"%@",_NS("VLC can check online for album art and metadata to enrich your playback experience, e.g. by providing track information when playing Audio CDs. To provide this functionality, VLC will send information about your contents to trusted services in an anonymized form.")];
NSInteger returnValue = [albumArtAlert runModal];
......@@ -272,11 +264,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setHasShadow:YES];
NSRect winrect = [self frame];
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
CGFloat f_titleBarHeight = [self.titlebarView frame].size.height;
[o_titlebar_view setFrame: NSMakeRect(0, winrect.size.height - f_titleBarHeight,
[self.titlebarView setFrame: NSMakeRect(0, winrect.size.height - f_titleBarHeight,
winrect.size.width, f_titleBarHeight)];
[[self contentView] addSubview: o_titlebar_view positioned: NSWindowAbove relativeTo: o_split_view];
[[self contentView] addSubview: self.titlebarView positioned: NSWindowAbove relativeTo: o_split_view];
if (winrect.size.height > 100) {
[self setFrame: winrect display:YES animate:YES];
......@@ -286,13 +278,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
winrect = [o_split_view frame];
winrect.size.height = winrect.size.height - f_titleBarHeight;
[o_split_view setFrame: winrect];
[o_video_view setFrame: winrect];
[self.videoView setFrame: winrect];
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
} else {
[o_video_view setFrame: [o_split_view frame]];
[self.videoView setFrame: [o_split_view frame]];
[o_playlist_table setBorderType: NSNoBorder];
[o_sidebar_scrollview setBorderType: NSNoBorder];
}
......@@ -317,7 +309,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* update fs button to reflect state for next startup */
if (var_InheritBool(pl_Get(VLCIntf), "fullscreen"))
[o_controls_bar setFullscreenState:YES];
[self.controlsBar setFullscreenState:YES];
/* restore split view */
f_lastLeftSplitViewWidth = 200;
......@@ -438,11 +430,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
}
- (VLCMainWindowControlsBar *)controlsBar;
{
return (VLCMainWindowControlsBar *)o_controls_bar;
}
- (void)resizePlaylistAfterCollapse
{
// no animation here since we might be in the middle of another resize animation
......@@ -473,7 +460,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)makeSplitViewVisible
{
if (self.darkInterface)
[self setContentMinSize: NSMakeSize(604., f_min_window_height + [o_titlebar_view frame].size.height)];
[self setContentMinSize: NSMakeSize(604., f_min_window_height + [self.titlebarView frame].size.height)];
else
[self setContentMinSize: NSMakeSize(604., f_min_window_height)];
......@@ -487,11 +474,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[self animator] setFrame: new_frame display: YES animate: YES];
}
[o_video_view setHidden: YES];
[self.videoView setHidden: YES];
[o_split_view setHidden: NO];
if (b_nativeFullscreenMode && [self fullscreen]) {
[[o_controls_bar bottomBarView] setHidden: NO];
[o_fspanel setNonActive:nil];
if (self.nativeFullscreenMode && [self fullscreen]) {
[[self.controlsBar bottomBarView] setHidden: NO];
[self.fspanel setNonActive:nil];
}
[self makeFirstResponder: o_playlist_table];
......@@ -500,19 +487,19 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)makeSplitViewHidden
{
if (self.darkInterface)
[self setContentMinSize: NSMakeSize(604., f_min_video_height + [o_titlebar_view frame].size.height)];
[self setContentMinSize: NSMakeSize(604., f_min_video_height + [self.titlebarView frame].size.height)];
else
[self setContentMinSize: NSMakeSize(604., f_min_video_height)];
[o_split_view setHidden: YES];
[o_video_view setHidden: NO];
if (b_nativeFullscreenMode && [self fullscreen]) {
[[o_controls_bar bottomBarView] setHidden: YES];
[o_fspanel setActive:nil];
[self.videoView setHidden: NO];
if (self.nativeFullscreenMode && [self fullscreen]) {
[[self.controlsBar bottomBarView] setHidden: YES];
[self.fspanel setActive:nil];
}
if ([[o_video_view subviews] count] > 0)
[self makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
if ([[self.videoView subviews] count] > 0)
[self makeFirstResponder: [[self.videoView subviews] objectAtIndex:0]];
}
......@@ -543,8 +530,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
return;
}
if (!(b_nativeFullscreenMode && self.fullscreen) && !b_splitview_removed && ((b_have_alt_key && b_activeVideo)
|| (b_nonembedded && event == psUserEvent)
if (!(self.nativeFullscreenMode && self.fullscreen) && !b_splitview_removed && ((b_have_alt_key && b_activeVideo)
|| (self.nonembedded && event == psUserEvent)
|| (!b_activeVideo && event == psUserEvent)
|| (b_minimized_view && event == psVideoStartedOrStoppedEvent))) {
// for starting playback, window is resized through resized events
......@@ -553,7 +540,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
b_minimized_view = NO;
} else {
if (b_splitview_removed) {
if (!b_nonembedded || (event == psUserEvent && b_nonembedded))
if (!self.nonembedded || (event == psUserEvent && self.nonembedded))
[self showSplitView: event != psVideoStartedOrStoppedEvent];
if (event != psUserEvent)
......@@ -565,15 +552,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
b_restored = YES;
}
if (!b_nonembedded) {
if (([o_video_view isHidden] && b_activeVideo) || b_restored || (b_activeVideo && event != psUserEvent))
if (!self.nonembedded) {
if (([self.videoView isHidden] && b_activeVideo) || b_restored || (b_activeVideo && event != psUserEvent))
[self makeSplitViewHidden];
else
[self makeSplitViewVisible];
} else {
[o_split_view setHidden: NO];
[o_playlist_table setHidden: NO];
[o_video_view setHidden: YES];
[self.videoView setHidden: YES];
}
}
......@@ -617,7 +604,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (config_GetInt(VLCIntf, "macosx-pause-minimized")) {
id obj = [notification object];
if ([obj class] == [VLCVideoWindowCommon class] || [obj class] == [VLCDetachedVideoWindow class] || ([obj class] == [VLCMainWindow class] && !b_nonembedded)) {
if ([obj class] == [VLCVideoWindowCommon class] || [obj class] == [VLCDetachedVideoWindow class] || ([obj class] == [VLCMainWindow class] && !self.nonembedded)) {
if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] pause];
}
......@@ -655,11 +642,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
if (self.darkInterface) {
[self setContentMinSize: NSMakeSize(604., [o_controls_bar height] + [o_titlebar_view frame].size.height)];
[self setContentMaxSize: NSMakeSize(FLT_MAX, [o_controls_bar height] + [o_titlebar_view frame].size.height)];
[self setContentMinSize: NSMakeSize(604., [self.controlsBar height] + [self.titlebarView frame].size.height)];
[self setContentMaxSize: NSMakeSize(FLT_MAX, [self.controlsBar height] + [self.titlebarView frame].size.height)];
} else {
[self setContentMinSize: NSMakeSize(604., [o_controls_bar height])];
[self setContentMaxSize: NSMakeSize(FLT_MAX, [o_controls_bar height])];
[self setContentMinSize: NSMakeSize(604., [self.controlsBar height])];
[self setContentMaxSize: NSMakeSize(FLT_MAX, [self.controlsBar height])];
}
b_splitview_removed = YES;
......@@ -669,7 +656,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
[self updateWindow];
if (self.darkInterface)
[self setContentMinSize:NSMakeSize(604., f_min_window_height + [o_titlebar_view frame].size.height)];
[self setContentMinSize:NSMakeSize(604., f_min_window_height + [self.titlebarView frame].size.height)];
else
[self setContentMinSize:NSMakeSize(604., f_min_window_height)];
[self setContentMaxSize: NSMakeSize(FLT_MAX, FLT_MAX)];
......@@ -691,8 +678,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)updateTimeSlider
{
[o_controls_bar updateTimeSlider];
[o_fspanel updatePositionAndTime];
[self.controlsBar updateTimeSlider];
[self.fspanel updatePositionAndTime];
[[[VLCMain sharedInstance] voutController] updateWindowsControlsBarWithSelector:@selector(updateTimeSlider)];
......@@ -746,7 +733,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_window setTitle:aString];
}];
[o_fspanel setStreamTitle: aString];
[self.fspanel setStreamTitle: aString];
} else {
[self setTitle: _NS("VLC media player")];
[self setRepresentedURL: nil];
......@@ -761,7 +748,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)updateWindow
{
[o_controls_bar updateControls];
[self.controlsBar updateControls];
[[[VLCMain sharedInstance] voutController] updateWindowsControlsBarWithSelector:@selector(updateControls)];
bool b_seekable = false;
......@@ -776,8 +763,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
[self updateTimeSlider];
if ([o_fspanel respondsToSelector:@selector(setSeekable:)])
[o_fspanel setSeekable: b_seekable];
if ([self.fspanel respondsToSelector:@selector(setSeekable:)])
[self.fspanel setSeekable: b_seekable];
PL_LOCK;
if ([[[[VLCMain sharedInstance] playlist] model] currentRootType] != ROOT_TYPE_PLAYLIST ||
......@@ -793,24 +780,24 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)setPause
{
[o_controls_bar setPause];
[o_fspanel setPause];
[self.controlsBar setPause];
[self.fspanel setPause];
[[[VLCMain sharedInstance] voutController] updateWindowsControlsBarWithSelector:@selector(setPause)];
}
- (void)setPlay
{
[o_controls_bar setPlay];
[o_fspanel setPlay];
[self.controlsBar setPlay];
[self.fspanel setPlay];
[[[VLCMain sharedInstance] voutController] updateWindowsControlsBarWithSelector:@selector(setPlay)];
}
- (void)updateVolumeSlider
{
[[self controlsBar] updateVolumeSlider];
[o_fspanel setVolumeLevel: [[VLCCoreInteraction sharedInstance] volume]];
[(VLCMainWindowControlsBar *)[self controlsBar] updateVolumeSlider];
[self.fspanel setVolumeLevel: [[VLCCoreInteraction sharedInstance] volume]];
}
#pragma mark -
......@@ -827,10 +814,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
BOOL b_videoPlayback = [[VLCMain sharedInstance] activeVideoPlayback];
if (!b_videoPlayback) {
if (!b_nonembedded && (!b_nativeFullscreenMode || (b_nativeFullscreenMode && !self.fullscreen)) && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0) {
if (!self.nonembedded && (!self.nativeFullscreenMode || (self.nativeFullscreenMode && !self.fullscreen)) && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0) {
// only resize back to minimum view of this is still desired final state
CGFloat f_threshold_height = f_min_video_height + [o_controls_bar height];
CGFloat f_threshold_height = f_min_video_height + [self.controlsBar height];
if(frameBeforePlayback.size.height > f_threshold_height || b_minimized_view) {
if ([[VLCMain sharedInstance] isTerminating])
......@@ -845,7 +832,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
// update fs button to reflect state for next startup
if (var_InheritBool(VLCIntf, "fullscreen") || var_GetBool(pl_Get(VLCIntf), "fullscreen")) {
[o_controls_bar setFullscreenState:YES];
[self.controlsBar setFullscreenState:YES];
}
[self makeFirstResponder: o_playlist_table];
......@@ -855,13 +842,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setAlphaValue:1.0];
}
if (b_nativeFullscreenMode) {
if (self.nativeFullscreenMode) {
if ([self hasActiveVideo] && [self fullscreen]) {
[[o_controls_bar bottomBarView] setHidden: b_videoPlayback];
[o_fspanel setActive: nil];
[[self.controlsBar bottomBarView] setHidden: b_videoPlayback];
[self.fspanel setActive: nil];
} else {
[[o_controls_bar bottomBarView] setHidden: NO];
[o_fspanel setNonActive: nil];
[[self.controlsBar bottomBarView] setHidden: NO];
[self.fspanel setNonActive: nil];
}
}
}
......@@ -875,8 +862,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
// update split view frame after removing title bar
if (self.darkInterface) {
NSRect frame = [[self contentView] frame];
frame.origin.y += [o_controls_bar height];
frame.size.height -= [o_controls_bar height];
frame.origin.y += [self.controlsBar height];
frame.size.height -= [self.controlsBar height];
[o_split_view setFrame:frame];
}
}
......@@ -888,7 +875,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
// update split view frame after readding title bar
if (self.darkInterface) {
NSRect frame = [o_split_view frame];
frame.size.height -= [o_titlebar_view frame].size.height;
frame.size.height -= [self.titlebarView frame].size.height;
[o_split_view setFrame:frame];
}
}
......@@ -902,7 +889,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if ([currentWindow respondsToSelector:@selector(fullscreen)] && [currentWindow fullscreen] && ![[currentWindow videoView] isHidden]) {
if ([[VLCMain sharedInstance] activeVideoPlayback])
[o_fspanel fadeIn];
[self.fspanel fadeIn];
}
}
......@@ -1391,11 +1378,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setHasShadow:YES];
NSRect winrect = [self frame];
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
CGFloat f_titleBarHeight = [self.titlebarView frame].size.height;
[self setTitle: _NS("VLC media player")];
[o_titlebar_view setFrame: NSMakeRect(0, winrect.size.height - f_titleBarHeight, winrect.size.width, f_titleBarHeight)];
[[self contentView] addSubview: o_titlebar_view positioned: NSWindowAbove relativeTo: nil];
[self.titlebarView setFrame: NSMakeRect(0, winrect.size.height - f_titleBarHeight, winrect.size.width, f_titleBarHeight)];
[[self contentView] addSubview: self.titlebarView positioned: NSWindowAbove relativeTo: nil];
} else {
[self setBackgroundColor: [NSColor blackColor]];
......@@ -1403,18 +1390,18 @@ static VLCMainWindow *_o_sharedInstance = nil;
NSRect videoViewRect = [[self contentView] bounds];
if (darkInterface)
videoViewRect.size.height -= [o_titlebar_view frame].size.height;
videoViewRect.size.height -= [self.titlebarView frame].size.height;
CGFloat f_bottomBarHeight = [[self controlsBar] height];
videoViewRect.size.height -= f_bottomBarHeight;
videoViewRect.origin.y = f_bottomBarHeight;
[o_video_view setFrame: videoViewRect];
[self.videoView setFrame: videoViewRect];
if (darkInterface) {
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_video_view frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_video_view];
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [self.videoView frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: self.videoView];