Commit 9322e135 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: simplify ea98fcfc

thanks to David for the feedback
parent 885af344
...@@ -158,7 +158,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -158,7 +158,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
#endif #endif
t_hide_mouse_timer = nil; t_hide_mouse_timer = nil;
[self useOptimizedDrawing: YES]; [self useOptimizedDrawing: YES];
[[o_search_fld cell] setPlaceholderString: _NS("Search")]; [[o_search_fld cell] setPlaceholderString: _NS("Search")];
[[o_search_fld cell] accessibilitySetOverrideValue:_NS("Enter a term to search the playlist. Results will be selected in the table.") forAttribute:NSAccessibilityDescriptionAttribute]; [[o_search_fld cell] accessibilitySetOverrideValue:_NS("Enter a term to search the playlist. Results will be selected in the table.") forAttribute:NSAccessibilityDescriptionAttribute];
...@@ -199,7 +199,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -199,7 +199,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
b_dropzone_active = YES; b_dropzone_active = YES;
[o_dropzone_view setFrame: [o_playlist_table frame]]; [o_dropzone_view setFrame: [o_playlist_table frame]];
[o_left_split_view setFrame: [o_sidebar_view frame]]; [o_left_split_view setFrame: [o_sidebar_view frame]];
if (b_nativeFullscreenMode) { if (b_nativeFullscreenMode) {
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary]; [self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
} else { } else {
...@@ -360,7 +360,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -360,7 +360,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]]; o_color_backdrop = [[VLCColorView alloc] initWithFrame: [o_split_view frame]];
[[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view]; [[self contentView] addSubview: o_color_backdrop positioned: NSWindowBelow relativeTo: o_split_view];
[o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; [o_color_backdrop setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
} else { } else {
[o_video_view setFrame: [o_split_view frame]]; [o_video_view setFrame: [o_split_view frame]];
[o_playlist_table setBorderType: NSNoBorder]; [o_playlist_table setBorderType: NSNoBorder];
...@@ -525,7 +525,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -525,7 +525,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)someWindowWillClose:(NSNotification *)notification - (void)someWindowWillClose:(NSNotification *)notification
{ {
id obj = [notification object]; 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] && !b_nonembedded)) {
if ([[VLCMain sharedInstance] activeVideoPlayback]) if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] stop]; [[VLCCoreInteraction sharedInstance] stop];
...@@ -878,6 +878,15 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -878,6 +878,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fspanel setVoutWasUpdated: self]; [o_fspanel setVoutWasUpdated: self];
[o_fspanel setActive: nil]; [o_fspanel setActive: nil];
NSArray *subviews = [[self videoView] subviews];
NSUInteger count = [subviews count];
for (NSUInteger x = 0; x < count; x++) {
if ([[subviews objectAtIndex:x] respondsToSelector:@selector(reshape)])
[[subviews objectAtIndex:x] reshape];
}
} }
- (void)windowWillExitFullScreen:(NSNotification *)notification - (void)windowWillExitFullScreen:(NSNotification *)notification
......
...@@ -54,8 +54,6 @@ ...@@ -54,8 +54,6 @@
if (p_vout) if (p_vout)
vlc_object_release(p_vout); vlc_object_release(p_vout);
[[NSNotificationCenter defaultCenter] removeObserver: self];
[self unregisterDraggedTypes]; [self unregisterDraggedTypes];
[super dealloc]; [super dealloc];
} }
...@@ -69,14 +67,6 @@ ...@@ -69,14 +67,6 @@
i_lastScrollWheelDirection = 0; i_lastScrollWheelDirection = 0;
f_cumulated_magnification = 0.0; f_cumulated_magnification = 0.0;
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD) {
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(osWillChangeFullScreenStatus:) name: NSWindowWillEnterFullScreenNotification object: nil];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(osWillChangeFullScreenStatus:) name: NSWindowDidEnterFullScreenNotification object: nil];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(osWillChangeFullScreenStatus:) name: NSWindowWillExitFullScreenNotification object: nil];
}
#endif
return self; return self;
} }
...@@ -296,23 +286,6 @@ ...@@ -296,23 +286,6 @@
#pragma mark - #pragma mark -
#pragma mark Basic view behaviour and touch events handling #pragma mark Basic view behaviour and touch events handling
- (void)osWillChangeFullScreenStatus:(NSNotification *)notification
{
playlist_t *p_playlist = pl_Get(VLCIntf);
if ([notification.name isEqualToString:@"NSWindowWillEnterFullScreenNotification"] || [notification.name isEqualToString:@"NSWindowDidEnterFullScreenNotification"])
var_SetBool(p_playlist, "fullscreen", 1);
else
var_SetBool(p_playlist, "fullscreen", 0);
NSArray *subviews = [self subviews];
NSUInteger count = [subviews count];
for (NSUInteger x = 0; x < count; x++) {
if ([[subviews objectAtIndex:x] respondsToSelector:@selector(reshape)])
[[subviews objectAtIndex:x] reshape];
}
}
- (BOOL)mouseDownCanMoveWindow - (BOOL)mouseDownCanMoveWindow
{ {
return YES; return YES;
......
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