[vlc-commits] macosx: simplify ea98fcfc
Felix Paul Kühne
git at videolan.org
Wed Dec 26 12:29:46 CET 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Dec 26 12:18:33 2012 +0100| [9322e135d79228221a0f52d4a745b43cb087be3f] | committer: Felix Paul Kühne
macosx: simplify ea98fcfc
thanks to David for the feedback
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9322e135d79228221a0f52d4a745b43cb087be3f
---
modules/gui/macosx/MainWindow.m | 17 +++++++++++++----
modules/gui/macosx/VideoView.m | 27 ---------------------------
2 files changed, 13 insertions(+), 31 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index b4fa1f6..d7b6075 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -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
diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index e711797..cd88942 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -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;
More information about the vlc-commits
mailing list