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;
#endif
t_hide_mouse_timer = nil;
[self useOptimizedDrawing: YES];
[[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];
......@@ -199,7 +199,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
b_dropzone_active = YES;
[o_dropzone_view setFrame: [o_playlist_table frame]];
[o_left_split_view setFrame: [o_sidebar_view frame]];
if (b_nativeFullscreenMode) {
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
} else {
......@@ -360,7 +360,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
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]];
[o_playlist_table setBorderType: NSNoBorder];
......@@ -525,7 +525,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)someWindowWillClose:(NSNotification *)notification
{
id obj = [notification object];
if ([obj class] == [VLCVideoWindowCommon class] || [obj class] == [VLCDetachedVideoWindow class] || ([obj class] == [VLCMainWindow class] && !b_nonembedded)) {
if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] stop];
......@@ -878,6 +878,15 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_fspanel setVoutWasUpdated: self];
[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
......
......@@ -54,8 +54,6 @@
if (p_vout)
vlc_object_release(p_vout);
[[NSNotificationCenter defaultCenter] removeObserver: self];
[self unregisterDraggedTypes];
[super dealloc];
}
......@@ -69,14 +67,6 @@
i_lastScrollWheelDirection = 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;
}
......@@ -296,23 +286,6 @@
#pragma mark -
#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
{
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