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,7 +229,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* reload the sidebar */
[self reloadSidebar];
o_fspanel = [[VLCFSPanel alloc] initWithContentRect:NSMakeRect(110.,267.,549.,87.)
_fspanel = [[VLCFSPanel alloc] initWithContentRect:NSMakeRect(110.,267.,549.,87.)
styleMask:NSTexturedBackgroundWindowMask
backing:NSBackingStoreBuffered
defer:YES];
......@@ -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];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height] + [o_titlebar_view frame].size.height)];
[self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height] + [self.titlebarView frame].size.height)];
} else {
[self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height])];
}
......
......@@ -26,32 +26,16 @@
#pragma mark -
@interface PLItem()
{
input_item_t *p_input;
int _playlistId;
NSMutableArray *_children;
PLItem *_parent;
}
@end
@implementation PLItem
@synthesize children=_children;
@synthesize plItemId=_playlistId;
@synthesize input=p_input;
@synthesize parent=_parent;
- (id)initWithPlaylistItem:(playlist_item_t *)p_item;
{
self = [super init];
if(self) {
_playlistId = p_item->i_id;
_plItemId = p_item->i_id;
p_input = p_item->p_input;
input_item_Hold(p_input);
_input = p_item->p_input;
input_item_Hold(_input);
_children = [[NSMutableArray alloc] init];
}
......@@ -60,7 +44,7 @@
- (void)dealloc
{
input_item_Release(p_input);
input_item_Release(_input);
}
// own hash and isEqual methods are important to retain expandable state
......
......@@ -40,14 +40,9 @@
@interface PLModel ()
{
PLItem *_rootItem;
playlist_t *p_playlist;
NSOutlineView *_outlineView;
// TODO: write these objects to the pastboard properly?
NSMutableArray *_draggedItems;
// TODO: for transition
VLCPlaylist *_playlist;
}
......@@ -55,9 +50,6 @@
@implementation PLModel
@synthesize rootItem=_rootItem;
@synthesize draggedItems=_draggedItems;
#pragma mark -
#pragma mark Init and Stuff
......
......@@ -15,8 +15,6 @@
{
id <PXSourceListDelegate> _secondaryDelegate; //Used to store the publicly visible delegate
id <PXSourceListDataSource> _secondaryDataSource; //Used to store the publicly visible data source
NSSize _iconSize; //The size of icons in the Source List. Defaults to 16x16
}
@property (nonatomic) NSSize iconSize;
......
......@@ -49,7 +49,6 @@ NSString * const PXSLDeleteKeyPressedOnRowsNotification = @"PXSourceListDeleteKe
#pragma mark -
@implementation PXSourceList
@synthesize iconSize = _iconSize;
@dynamic dataSource;
@dynamic delegate;
......
......@@ -12,13 +12,8 @@
#import <Foundation/Foundation.h>
@interface SPInvocationGrabber : NSObject {
id _object;
NSInvocation *_invocation;
int frameCount;
char **frameStrings;
BOOL backgroundAfterForward;
BOOL onMainAfterForward;
BOOL waitUntilDone;
}
-(id)initWithObject:(id)obj;
-(id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack;
......
......@@ -40,9 +40,7 @@
self.object = nil;
self.invocation = nil;
}
@synthesize invocation = _invocation, object = _object;
@synthesize backgroundAfterForward, onMainAfterForward, waitUntilDone;
- (void)runInBackground;
{
@autoreleasepool {
......@@ -61,10 +59,10 @@
anInvocation.target = _object;
self.invocation = anInvocation;
if(backgroundAfterForward)
if(_backgroundAfterForward)
[NSThread detachNewThreadSelector:@selector(runInBackground) toTarget:self withObject:nil];
else if(onMainAfterForward)
[self performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:waitUntilDone];
else if(_onMainAfterForward)
[self performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:_waitUntilDone];
}
- (NSMethodSignature *)methodSignatureForSelector:(SEL)inSelector {
......
......@@ -26,16 +26,6 @@
static VLCEnterTextPanel *_textPanelInstance = nil;
static VLCSelectItemInPopupPanel *_selectItemPanelInstance = nil;
@interface VLCEnterTextPanel()
{
__unsafe_unretained NSString * _title;
__unsafe_unretained NSString * _subtitle;
__unsafe_unretained NSString * _okTitle;
__unsafe_unretained NSString * _cancelTitle;
__unsafe_unretained id _target;
}
@end
@implementation VLCEnterTextPanel
+ (VLCEnterTextPanel *)sharedInstance
{
......@@ -50,8 +40,6 @@ static VLCSelectItemInPopupPanel *_selectItemPanelInstance = nil;
return _textPanelInstance;
}
@synthesize title=_title, subTitle=_subtitle, OKButtonLabel=_okTitle, CancelButtonLabel=_cancelTitle, target=_target;
- (IBAction)windowElementAction:(id)sender
{
[_panel orderOut:sender];
......@@ -85,20 +73,7 @@ static VLCSelectItemInPopupPanel *_selectItemPanelInstance = nil;
@end
@interface VLCSelectItemInPopupPanel()
{
__unsafe_unretained NSString * _title;
__unsafe_unretained NSString * _subtitle;
__unsafe_unretained NSString * _okTitle;
__unsafe_unretained NSString * _cancelTitle;
__unsafe_unretained NSArray * _popData;
__unsafe_unretained id _target;
}
@end
@implementation VLCSelectItemInPopupPanel
@synthesize title=_title, subTitle=_subtitle, OKButtonLabel=_okTitle, CancelButtonLabel=_cancelTitle, popupButtonContent=_popData, target=_target;
+ (VLCSelectItemInPopupPanel *)sharedInstance
{
......
......@@ -28,21 +28,7 @@
*/
@interface SideBarItem : NSObject {
NSString *title;
NSString *identifier;
NSString *untranslatedTitle;
NSImage *icon;
NSInteger badgeValue;
NSInteger sdtype;
NSArray *children;
}
@interface SideBarItem : NSObject
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *identifier;
......
......@@ -15,23 +15,14 @@
@implementation SideBarItem
@synthesize title;
@synthesize untranslatedTitle;
@synthesize identifier;
@synthesize icon;
@synthesize badgeValue;
@synthesize children;
@synthesize sdtype;
#pragma mark -
#pragma mark Init/Dealloc/Finalize
- (id)init
{
if(self=[super init])
{
badgeValue = -1; //We don't want a badge value by default
sdtype = -1; //no sd type set
if (self=[super init]) {
_badgeValue = -1; //We don't want a badge value by default
_sdtype = -1; //no sd type set
}
return self;
......@@ -63,17 +54,17 @@
- (BOOL)hasBadge
{
return badgeValue!=-1;
return _badgeValue!=-1;
}
- (BOOL)hasChildren
{
return [children count]>0;
return [_children count]>0;
}
- (BOOL)hasIcon
{
return icon!=nil;
return _icon!=nil;
}
@end
......@@ -46,7 +46,6 @@
// save the status level if at least one video window is on status level
NSUInteger i_statusLevelWindowCounter;
NSInteger i_currentWindowLevel;
NSInteger i_currentFloatingWindowLevel;
BOOL b_mainwindow_has_video;
}
......@@ -60,7 +59,7 @@
o_vout_dict = [[NSMutableDictionary alloc] init];
o_keyboard_backlight = [[KeyboardBacklight alloc] init];
i_currentWindowLevel = NSNormalWindowLevel;
i_currentFloatingWindowLevel = NSFloatingWindowLevel;
_currentStatusWindowLevel = NSFloatingWindowLevel;
return self;
}
......@@ -420,22 +419,21 @@
i_currentWindowLevel = i_level;
if (i_level == NSNormalWindowLevel) {
i_currentFloatingWindowLevel = NSFloatingWindowLevel;
_currentStatusWindowLevel = NSFloatingWindowLevel;
} else {
i_currentFloatingWindowLevel = i_level + 1;
_currentStatusWindowLevel = i_level + 1;
}
[[VLCMainWindow sharedInstance] setWindowLevel:i_level];
NSInteger currentStatusWindowLevel = self.currentStatusWindowLevel;
[[VLCVideoEffects sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCAudioEffects sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[[VLCMain sharedInstance] info] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCBookmarks sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCTrackSynchronization sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCMainWindow sharedInstance] setWindowLevel:i_level];
[[[VLCMain sharedInstance] resumeDialog] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCVideoEffects sharedInstance] updateCocoaWindowLevel:currentStatusWindowLevel];
[[VLCAudioEffects sharedInstance] updateCocoaWindowLevel:currentStatusWindowLevel];
[[[VLCMain sharedInstance] info] updateCocoaWindowLevel:currentStatusWindowLevel];
[[VLCBookmarks sharedInstance] updateCocoaWindowLevel:currentStatusWindowLevel];
[[VLCTrackSynchronization sharedInstance] updateCocoaWindowLevel:currentStatusWindowLevel];
[[[VLCMain sharedInstance] resumeDialog] updateCocoaWindowLevel:currentStatusWindowLevel];
}
@synthesize currentStatusWindowLevel=i_currentFloatingWindowLevel;
@end
......@@ -41,13 +41,6 @@
@implementation VLCVideoEffects
static VLCVideoEffects *_o_sharedInstance = nil;
@synthesize cropLeftValue, cropTopValue, cropRightValue, cropBottomValue;
@synthesize puzzleRowsValue, puzzleColumnsValue;
@synthesize wallRowsValue, wallColumnsValue;
@synthesize cloneValue;
@synthesize sepiaValue;
@synthesize posterizeValue;
+ (VLCVideoEffects *)sharedInstance
{
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
......
......@@ -69,19 +69,15 @@ static const float f_min_video_height = 70.0;
*****************************************************************************/
@interface VLCVideoWindowCommon : VLCWindow <NSWindowDelegate, NSAnimationDelegate>
{
IBOutlet VLCMainWindowTitleView *o_titlebar_view; // only set in main or detached window
IBOutlet __unsafe_unretained VLCVoutView *o_video_view;
IBOutlet VLCControlsBarCommon *o_controls_bar;
}
@property (nonatomic, assign) VLCVoutView* videoView;
@property (readonly) VLCControlsBarCommon* controlsBar;
@property (nonatomic, weak) IBOutlet VLCMainWindowTitleView *titlebarView; // only set in main or detached window
@property (nonatomic, weak) IBOutlet VLCVoutView* videoView;
@property (nonatomic, weak) IBOutlet VLCControlsBarCommon* controlsBar;
@property (readonly) BOOL inFullscreenTransition;
@property (readonly) BOOL darkInterface;
@property (readonly) BOOL windowShouldExitFullscreenWhenFinished;
@property (readwrite, assign) NSRect previousSavedFrame;
@property (readwrite, assign) NSSize nativeVideoSize;
@property (nonatomic, readwrite, assign) NSSize nativeVideoSize;
- (void)setWindowLevel:(NSInteger)i_state;
- (void)resizeWindow;
......
......@@ -273,7 +273,6 @@
@end
/*****************************************************************************
* VLCVideoWindowCommon
*
......@@ -295,12 +294,7 @@
NSTimer *t_hide_mouse_timer;
// true when the window is in transition for entering or exiting fullscreen
BOOL b_in_fullscreen_transition;
NSRect frameBeforeLionFullscreen;
BOOL b_windowShouldExitFullscreenWhenFinished;
}
- (void)customZoom:(id)sender;
......@@ -310,11 +304,6 @@
@implementation VLCVideoWindowCommon
@synthesize videoView=o_video_view;
@synthesize controlsBar=o_controls_bar;
@synthesize inFullscreenTransition=b_in_fullscreen_transition;
@synthesize windowShouldExitFullscreenWhenFinished=b_windowShouldExitFullscreenWhenFinished;
#pragma mark -
#pragma mark Init
......@@ -365,8 +354,8 @@
if (!title || [title length] < 1)
return;
if (_darkInterface && o_titlebar_view)
[o_titlebar_view setWindowTitle: title];
if (_darkInterface && self.titlebarView)
[self.titlebarView setWindowTitle: title];
[super setTitle: title];
}
......@@ -522,7 +511,7 @@
if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel)
return;
if (!self.fullscreen && !b_in_fullscreen_transition)
if (!self.fullscreen && !_inFullscreenTransition)
[self setLevel: i_state];
// save it for restore if window is currently minimized or in fullscreen
......@@ -546,8 +535,8 @@
/* Calculate the window's new size */
NSRect new_frame;
new_frame.size.width = [self frame].size.width - [o_video_view frame].size.width + f_width;
new_frame.size.height = [self frame].size.height - [o_video_view frame].size.height + f_height;
new_frame.size.width = [self frame].size.width - [_videoView frame].size.width + f_width;
new_frame.size.height = [self frame].size.height - [_videoView frame].size.height + f_height;
new_frame.origin.x = topleftscreen.x;
new_frame.origin.y = topleftscreen.y - new_frame.size.height;
......@@ -575,7 +564,7 @@
{
// VOUT_WINDOW_SET_SIZE is triggered when exiting fullscreen. This event is ignored here
// to avoid interference with the animation.
if ([self fullscreen] || b_in_fullscreen_transition)
if ([self fullscreen] || _inFullscreenTransition)
return;
NSRect window_rect = [self getWindowRectForProposedVideoViewSize:self.nativeVideoSize];
......@@ -596,20 +585,20 @@
return proposedFrameSize;
// needed when entering lion fullscreen mode
if (b_in_fullscreen_transition || [self fullscreen])
if (_inFullscreenTransition || [self fullscreen])
return proposedFrameSize;
if ([o_video_view isHidden])
if ([_videoView isHidden])
return proposedFrameSize;
if ([[VLCCoreInteraction sharedInstance] aspectRatioIsLocked]) {
NSRect videoWindowFrame = [self frame];
NSRect viewRect = [o_video_view convertRect:[o_video_view bounds] toView: nil];
NSRect viewRect = [_videoView convertRect:[_videoView bounds] toView: nil];
NSRect contentRect = [self contentRectForFrameRect:videoWindowFrame];
CGFloat marginy = viewRect.origin.y + videoWindowFrame.size.height - contentRect.size.height;
CGFloat marginx = contentRect.size.width - viewRect.size.width;
if (o_titlebar_view && _darkInterface)
marginy += [o_titlebar_view frame].size.height;
if (self.titlebarView && _darkInterface)
marginy += [self.titlebarView frame].size.height;
proposedFrameSize.height = (proposedFrameSize.width - marginx) * self.nativeVideoSize.height / self.nativeVideoSize.width + marginy;
}
......@@ -676,7 +665,7 @@
- (void)flagsChanged:(NSEvent *)theEvent
{
BOOL b_alt_pressed = ([theEvent modifierFlags] & NSAlternateKeyMask) != 0;
[o_titlebar_view informModifierPressed: b_alt_pressed];
[self.titlebarView informModifierPressed: b_alt_pressed];
[super flagsChanged:theEvent];
}
......@@ -690,16 +679,16 @@
// change fspanel state for the case when multiple windows are in fullscreen
if ([self hasActiveVideo] && [self fullscreen])
[[[VLCMainWindow sharedInstance] fsPanel] setActive:nil];
[[[VLCMainWindow sharedInstance] fspanel] setActive:nil];
else
[[[VLCMainWindow sharedInstance] fsPanel] setNonActive:nil];
[[[VLCMainWindow sharedInstance] fspanel] setNonActive:nil];
}
- (void)resignKeyWindow
{
[super resignKeyWindow];
[[[VLCMainWindow sharedInstance] fsPanel] setNonActive:nil];
[[[VLCMainWindow sharedInstance] fspanel] setNonActive:nil];
}
-(NSArray*)customWindowsToEnterFullScreenForWindow:(NSWindow *)window
......@@ -746,15 +735,15 @@
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
b_windowShouldExitFullscreenWhenFinished = [[VLCMain sharedInstance] activeVideoPlayback];
_windowShouldExitFullscreenWhenFinished = [[VLCMain sharedInstance] activeVideoPlayback];
NSInteger i_currLevel = [self level];
// self.fullscreen and b_in_fullscreen_transition must not be true yet
// self.fullscreen and _inFullscreenTransition must not be true yet
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: NSNormalWindowLevel];
[self setLevel:NSNormalWindowLevel];
i_originalLevel = i_currLevel;
b_in_fullscreen_transition = YES;
_inFullscreenTransition = YES;
var_SetBool(pl_Get(VLCIntf), "fullscreen", true);
......@@ -772,19 +761,19 @@
[[VLCMainWindow sharedInstance] recreateHideMouseTimer];
if (_darkInterface) {
[o_titlebar_view removeFromSuperviewWithoutNeedingDisplay];
[self.titlebarView removeFromSuperviewWithoutNeedingDisplay];
NSRect winrect;
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
CGFloat f_titleBarHeight = [self.titlebarView frame].size.height;
winrect = [self frame];
winrect.size.height = winrect.size.height - f_titleBarHeight;
[self setFrame: winrect display:NO animate:NO];
}
[o_video_view setFrame: [[self contentView] frame]];
if (![o_video_view isHidden]) {
[[o_controls_bar bottomBarView] setHidden: YES];
[_videoView setFrame: [[self contentView] frame]];
if (![_videoView isHidden]) {
[[self.controlsBar bottomBarView] setHidden: YES];
}
[self setMovableByWindowBackground: NO];
......@@ -797,12 +786,12 @@
[NSApp activateIgnoringOtherApps:YES];
[self setFullscreen: YES];
b_in_fullscreen_transition = NO;
_inFullscreenTransition = NO;
if ([self hasActiveVideo]) {
[[[VLCMainWindow sharedInstance] fsPanel] setVoutWasUpdated: self];
if (![o_video_view isHidden])
[[[VLCMainWindow sharedInstance] fsPanel] setActive: nil];
[[[VLCMainWindow sharedInstance] fspanel] setVoutWasUpdated: self];
if (![_videoView isHidden])
[[[VLCMainWindow sharedInstance] fspanel] setActive: nil];
}
NSArray *subviews = [[self videoView] subviews];
......@@ -816,7 +805,7 @@
- (void)windowWillExitFullScreen:(NSNotification *)notification
{
b_in_fullscreen_transition = YES;
_inFullscreenTransition = YES;
[self setFullscreen: NO];
if ([self hasActiveVideo]) {
......@@ -830,33 +819,33 @@
}
[NSCursor setHiddenUntilMouseMoves: NO];
[[[VLCMainWindow sharedInstance] fsPanel] setNonActive: nil];
[[[VLCMainWindow sharedInstance] fspanel] setNonActive: nil];
if (_darkInterface) {
NSRect winrect;
CGFloat f_titleBarHeight = [o_titlebar_view frame].size.height;
CGFloat f_titleBarHeight = [self.titlebarView frame].size.height;
winrect = [o_video_view frame];
winrect = [_videoView frame];
winrect.size.height -= f_titleBarHeight;
[o_video_view setFrame: winrect];
[_videoView setFrame: winrect];
winrect = [self frame];
[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];
[[self contentView] addSubview: self.titlebarView];
winrect.size.height = winrect.size.height + f_titleBarHeight;
[self setFrame: winrect display:NO animate:NO];
}
NSRect videoViewFrame = [o_video_view frame];
videoViewFrame.origin.y += [o_controls_bar height];
videoViewFrame.size.height -= [o_controls_bar height];
[o_video_view setFrame: videoViewFrame];
NSRect videoViewFrame = [_videoView frame];
videoViewFrame.origin.y += [self.controlsBar height];
videoViewFrame.size.height -= [self.controlsBar height];
[_videoView setFrame: videoViewFrame];
if (![o_video_view isHidden]) {
[[o_controls_bar bottomBarView] setHidden: NO];
if (![_videoView isHidden]) {
[[self.controlsBar bottomBarView] setHidden: NO];
}
[self setMovableByWindowBackground: YES];
......@@ -864,7 +853,7 @@
- (void)windowDidExitFullScreen:(NSNotification *)notification
{
b_in_fullscreen_transition = NO;
_inFullscreenTransition = NO;
[[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: i_originalLevel];
[self setLevel:i_originalLevel];
......@@ -894,8 +883,8 @@
screen_rect = [screen frame];
if (o_controls_bar)
[o_controls_bar setFullscreenState:YES];
if (self.controlsBar)
[self.controlsBar setFullscreenState:YES];
[[[VLCMainWindow sharedInstance] controlsBar] setFullscreenState:YES];
[[VLCMainWindow sharedInstance] recreateHideMouseTimer];
......@@ -914,7 +903,7 @@
if (!o_fullscreen_window) {
/* We can't change the styleMask of an already created NSWindow, so we create another window, and do eye catching stuff */
rect = [[o_video_view superview] convertRect: [o_video_view frame] toView: nil]; /* Convert to Window base coord */
rect = [[_videoView superview] convertRect: [_videoView frame] toView: nil]; /* Convert to Window base coord */
rect.origin.x += [self frame].origin.x;
rect.origin.y += [self frame].origin.y;
o_fullscreen_window = [[VLCWindow alloc] initWithContentRect:rect styleMask: NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
......@@ -925,8 +914,8 @@
[o_fullscreen_window setFullscreen: YES];
/* Make sure video view gets visible in case the playlist was visible before */
b_video_view_was_hidden = [o_video_view isHidden];
[o_video_view setHidden: NO];
b_video_view_was_hidden = [_videoView isHidden];
[_videoView setHidden: NO];
if (!b_animation) {
/* We don't animate if we are not visible, instead we
......@@ -939,10 +928,10 @@
}
NSDisableScreenUpdates();
[[o_video_view superview] replaceSubview:o_video_view with:o_temp_view];
[o_temp_view setFrame:[o_video_view frame]];
[[o_fullscreen_window contentView] addSubview:o_video_view];
[o_video_view setFrame: [[o_fullscreen_window contentView] frame]];
[[_videoView superview] replaceSubview:_videoView with:o_temp_view];
[o_temp_view setFrame:[_videoView frame]];
[[o_fullscreen_window contentView] addSubview:_videoView];
[_videoView setFrame: [[o_fullscreen_window contentView] frame]];
NSEnableScreenUpdates();
[screen setFullscreenPresentationOptions];
......@@ -964,12 +953,12 @@
return;
}
/* Make sure we don't see the o_video_view disappearing of the screen during this operation */
/* Make sure we don't see the _videoView disappearing of the screen during this operation */
NSDisableScreenUpdates();
[[o_video_view superview] replaceSubview:o_video_view with:o_temp_view];
[o_temp_view setFrame:[o_video_view frame]];
[[o_fullscreen_window contentView] addSubview:o_video_view];
[o_video_view setFrame: [[o_fullscreen_window contentView] frame]];
[[_videoView superview] replaceSubview:_videoView with:o_temp_view];
[o_temp_view setFrame:[_videoView frame]];
[[o_fullscreen_window contentView] addSubview:_videoView];
[_videoView setFrame: [[o_fullscreen_window contentView] frame]];
[o_fullscreen_window makeKeyAndOrderFront:self];
NSEnableScreenUpdates();
}
......@@ -1021,25 +1010,25 @@
[o_fullscreen_anim1 startAnimation];
/* fullscreenAnimation will be unlocked when animation ends */
b_in_fullscreen_transition = YES;
_inFullscreenTransition = YES;
}
- (void)hasBecomeFullscreen
{
if ([[o_video_view subviews] count] > 0)
[o_fullscreen_window makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
if ([[_videoView subviews] count] > 0)
[o_fullscreen_window makeFirstResponder: [[_videoView subviews] objectAtIndex:0]];
[o_fullscreen_window makeKeyWindow];
[o_fullscreen_window setAcceptsMouseMovedEvents: YES];
/* tell the fspanel to move itself to front next time it's triggered */
[[[VLCMainWindow sharedInstance] fsPanel] setVoutWasUpdated: o_fullscreen_window];
[[[VLCMainWindow sharedInstance] fsPanel] setActive: nil];
[[[VLCMainWindow sharedInstance] fspanel] setVoutWasUpdated: o_fullscreen_window];
[[[VLCMainWindow sharedInstance] fspanel] setActive: nil];
if ([self isVisible])
[self orderOut: self];
b_in_fullscreen_transition = NO;
_inFullscreenTransition = NO;
[self setFullscreen:YES];
}
......@@ -1049,21 +1038,21 @@
NSRect frame;
BOOL blackout_other_displays = var_InheritBool(VLCIntf, "macosx-black");
if (o_controls_bar)
[o_controls_bar setFullscreenState:NO];
if (self.controlsBar)
[self.controlsBar setFullscreenState:NO];
[[[VLCMainWindow sharedInstance] controlsBar] setFullscreenState:NO];
/* We always try to do so */
[NSScreen unblackoutScreens];
[[o_video_view window] makeKeyAndOrderFront: nil];
[[_videoView window] makeKeyAndOrderFront: nil];
/* Don't do anything if o_fullscreen_window is already closed */
if (!o_fullscreen_window) {
return;
}
[[[VLCMainWindow sharedInstance] fsPanel] setNonActive: nil];
[[[VLCMainWindow sharedInstance] fspanel] setNonActive: nil];
[[o_fullscreen_window screen] setNonFullscreenPresentationOptions];
if (o_fullscreen_anim1) {
......@@ -1075,7 +1064,7 @@
o_fullscreen_anim2 = nil;
}
b_in_fullscreen_transition = YES;
_inFullscreenTransition = YES;
[self setFullscreen:NO];
if (!b_animation) {
......@@ -1104,7 +1093,7 @@
[self setAlphaValue: 0.0];
[self orderFront: self];
[[o_video_view window] orderFront: self];
[[_videoView window] orderFront: self];
frame = [[o_temp_view superview] convertRect: [o_temp_view frame] toView: nil]; /* Convert to Window base coord */
frame.origin.x += [self frame].origin.x;
......@@ -1144,18 +1133,18 @@
- (void)hasEndedFullscreen
{
b_in_fullscreen_transition = NO;
_inFullscreenTransition = NO;
/* This function is private and should be only triggered at the end of the fullscreen change animation */
/* Make sure we don't see the o_video_view disappearing of the screen during this operation */
/* Make sure we don't see the _videoView disappearing of the screen during this operation */
NSDisableScreenUpdates();
[o_video_view removeFromSuperviewWithoutNeedingDisplay];
[[o_temp_view superview] replaceSubview:o_temp_view with:o_video_view];
[o_video_view setFrame:[o_temp_view frame]];
if ([[o_video_view subviews] count] > 0)
[self makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
[_videoView removeFromSuperviewWithoutNeedingDisplay];
[[o_temp_view superview] replaceSubview:o_temp_view with:_videoView];
[_videoView setFrame:[o_temp_view frame]];
if ([[_videoView subviews] count] > 0)
[self makeFirstResponder: [[_videoView subviews] objectAtIndex:0]];
[o_video_view setHidden: b_video_view_was_hidden];
[_videoView setHidden: b_video_view_was_hidden];
[self makeKeyAndOrderFront:self];
......@@ -1192,7 +1181,7 @@
- (NSArray *)accessibilityAttributeNames
{
if (!_darkInterface || !o_titlebar_view)
if (!_darkInterface || !self.titlebarView)
return [super accessibilityAttributeNames];
static NSMutableArray *attributes = nil;
......@@ -1213,8 +1202,8 @@
- (id)accessibilityAttributeValue: (NSString*)o_attribute_name
{
if (_darkInterface && o_titlebar_view) {
VLCMainWindowTitleView *o_tbv = o_titlebar_view;
if (_darkInterface && self.titlebarView) {
VLCMainWindowTitleView *o_tbv = self.titlebarView;
if ([o_attribute_name isEqualTo: NSAccessibilitySubroleAttribute])
return NSAccessibilityStandardWindowSubrole;
......
......@@ -46,8 +46,6 @@
*****************************************************************************/
@implementation VLCControls
@synthesize jumpTimeValue;
- (void)awakeFromNib
{
[o_specificTime_mi setTitle: _NS("Jump to Time")];
......
......@@ -35,7 +35,6 @@
@interface VLCCoreDialogProvider()
{
ErrorWindowController *o_error_panel;
BOOL b_progress_cancelled;
}
@end
......@@ -43,8 +42,6 @@
static VLCCoreDialogProvider *_o_sharedInstance = nil;
@synthesize progressCancelled=b_progress_cancelled;
+ (VLCCoreDialogProvider *)sharedInstance
{
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
......@@ -54,7 +51,7 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
{
if (!_o_sharedInstance) {
_o_sharedInstance = [super init];
b_progress_cancelled = NO;
_progressCancelled = NO;
}
return _o_sharedInstance;
......
......@@ -28,17 +28,8 @@
/* for various VLC core related calls */
#import "intf.h"
@interface VLCEyeTVController()
{
BOOL b_eyeTVactive;
BOOL b_deviceConnected;
}
@end
@implementation VLCEyeTVController
@synthesize eyeTVRunning = b_eyeTVactive, deviceConnected = b_deviceConnected;
static VLCEyeTVController *_o_sharedInstance = nil;
+ (VLCEyeTVController *)sharedInstance
......@@ -66,15 +57,15 @@ static VLCEyeTVController *_o_sharedInstance = nil;
{
/* update our info on the used device */
if ([[theNotification name] isEqualToString: @"DeviceAdded"])
b_deviceConnected = YES;
_deviceConnected = YES;
if ([[theNotification name] isEqualToString: @"DeviceRemoved"])
b_deviceConnected = NO;
_deviceConnected = NO;
/* is eyetv running? */
if ([[theNotification name] isEqualToString: @"PluginInit"])
b_eyeTVactive = YES;
_eyeTVRunning = YES;
if ([[theNotification name] isEqualToString: @"PluginQuit"])
b_eyeTVactive = NO;
_eyeTVRunning = NO;
}
- (void)launchEyeTV
......
......@@ -513,7 +513,6 @@ audio_output_t *getAout(void)
BOOL nib_coredialogs_loaded; /* CoreDialogs nibfile */
BOOL nib_bookmarks_loaded; /* Bookmarks nibfile */
BOOL b_active_videoplayback;
BOOL b_nativeFullscreenMode;
bool b_intf_terminating; /* Makes sure applicationWillTerminate will be called only once */
......@@ -528,8 +527,6 @@ audio_output_t *getAout(void)
NSArray *o_usedHotkeys;
VLCVoutWindowController *o_vout_controller;
InputManager *o_input_manager;
}
......@@ -544,9 +541,6 @@ audio_output_t *getAout(void)
*****************************************************************************/
@implementation VLCMain
@synthesize voutController=o_vout_controller;
@synthesize nativeFullscreenMode=b_nativeFullscreenMode;
#pragma mark -
#pragma mark Initialization
......@@ -580,7 +574,7 @@ static VLCMain *_o_sharedMainInstance = nil;
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"LiveUpdateTheMessagesPanel"];
[defaults registerDefaults:appDefaults];
o_vout_controller = [[VLCVoutWindowController alloc] init];
_voutController = [[VLCVoutWindowController alloc] init];
return _o_sharedMainInstance;
}
......@@ -650,10 +644,10 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_remote setDelegate: _o_sharedMainInstance];
/* yeah, we are done */
b_nativeFullscreenMode = NO;
_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
b_nativeFullscreenMode = var_InheritBool(p_intf, "macosx-nativefullscreenmode");
_nativeFullscreenMode = var_InheritBool(p_intf, "macosx-nativefullscreenmode");
#endif
if (config_GetInt(VLCIntf, "macosx-icon-change")) {
......@@ -798,7 +792,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_vout_provider_lock lock];
// closes all open vouts
o_vout_controller = nil;
_voutController = nil;
[o_vout_provider_lock unlock];
/* unsubscribe from libvlc's debug messages */
......@@ -1224,18 +1218,20 @@ static VLCMain *_o_sharedMainInstance = nil;
bool loop = var_GetBool(p_playlist, "loop");
bool repeat = var_GetBool(p_playlist, "repeat");
VLCMainWindowControlsBar *controlsBar = (VLCMainWindowControlsBar *)[o_mainwindow controlsBar];
if (repeat) {
[[o_mainwindow controlsBar] setRepeatOne];
[controlsBar setRepeatOne];
[o_mainmenu setRepeatOne];
} else if (loop) {
[[o_mainwindow controlsBar] setRepeatAll];
[controlsBar setRepeatAll];
[o_mainmenu setRepeatAll];
} else {
[[o_mainwindow controlsBar] setRepeatOff];
[controlsBar setRepeatOff];
[o_mainmenu setRepeatOff];
}
[[o_mainwindow controlsBar] setShuffle];
[controlsBar setShuffle];
[o_mainmenu setShuffle];
}
......
......@@ -317,16 +317,11 @@ static bool b_old_spaces_style = YES;
@interface VLCDragDropView()
{
bool b_activeDragAndDrop;
__unsafe_unretained id _dropHandler;
}
@end
@implementation VLCDragDropView
@synthesize dropHandler=_dropHandler;
@synthesize drawBorder;
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
......@@ -592,16 +587,8 @@ void _drawFrameInRect(NSRect frameRect)
* VLCVolumeSliderCommon
*****************************************************************************/
@interface VLCVolumeSliderCommon()
{
BOOL _usesBrightArtwork;
}
@end
@implementation VLCVolumeSliderCommon : NSSlider
@synthesize usesBrightArtwork = _usesBrightArtwork;
- (void)scrollWheel:(NSEvent *)o_event
{
BOOL b_up = NO;
......
......@@ -94,8 +94,6 @@ struct display_info_t
@implementation VLCOpen
@synthesize fileSubDelay, fileSubFps;
#pragma mark -
#pragma mark Init
......
......@@ -79,9 +79,7 @@
IBOutlet id o_http_chkbox;
IBOutlet id o_file_chkbox;
}
@property (readwrite, retain) NSArray * soutMRL;
- (void)setTranscode:(NSString *)o_transcode_string;
@property (readwrite, retain) NSArray *soutMRL;
- (void)initStrings;
......
......@@ -40,18 +40,16 @@
@interface VLCOutput()
{
NSArray *o_mrl;
NSString *o_transcode;
}
@end
@implementation VLCOutput
@synthesize soutMRL=o_mrl;
- (id)init
{
self = [super init];
o_mrl = [[NSArray alloc] init];
_soutMRL = [[NSArray alloc] init];
o_transcode = [[NSString alloc] init];
return self;
}
......
......@@ -429,8 +429,6 @@ error:
@interface VLCInfoTreeItem ()
{
NSString *_name;
NSString *_value;
int i_object_id;
input_item_t * p_item;
VLCInfoTreeItem *_parent;
......@@ -442,8 +440,6 @@ error:
@implementation VLCInfoTreeItem
@synthesize name = _name, value = _value;
- (id)initWithName:(NSString *)item_name
value:(NSString *)item_value
ID:(int)i_id
......
......@@ -388,13 +388,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
@interface VLCConfigControl()
{
char *psz_name;
int i_type;
bool b_advanced;
}
@end
@implementation VLCConfigControl
@synthesize type = i_type, advanced = b_advanced;
- (id)initWithFrame:(NSRect)frame
{
......@@ -410,8 +407,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self != nil) {
_p_item = p_item;
psz_name = p_item->psz_name;
i_type = p_item->i_type;
b_advanced = p_item->b_advanced;
_type = p_item->i_type;
_advanced = p_item->b_advanced;
[self setAutoresizingMask:NSViewWidthSizable | NSViewMinYMargin ];
}
return (self);
......
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