[vlc-commits] macosx: cosmetics

Felix Paul Kühne git at videolan.org
Wed Jul 15 20:34:44 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jul 15 20:32:38 2015 +0200| [4296e06b143fb2830ea809355904c3ac214ad77b] | committer: Felix Paul Kühne

macosx: cosmetics

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4296e06b143fb2830ea809355904c3ac214ad77b
---

 modules/gui/macosx/MainWindow.m |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 01c1086..5ce53a1 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -244,9 +244,10 @@ static VLCMainWindow *sharedInstance = nil;
     // select playlist item by default
     [o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
 
+    NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
     if (self.darkInterface) {
-        [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidResizeNotification object: nil];
-        [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidMoveNotification object: nil];
+        [defaultCenter addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidResizeNotification object: nil];
+        [defaultCenter addObserver: self selector: @selector(windowResizedOrMoved:) name: NSWindowDidMoveNotification object: nil];
 
         [self setBackgroundColor: [NSColor clearColor]];
         [self setOpaque: NO];
@@ -280,10 +281,10 @@ static VLCMainWindow *sharedInstance = nil;
         [o_sidebar_scrollview setBorderType: NSNoBorder];
     }
 
-    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillClose:) name: NSWindowWillCloseNotification object: nil];
-    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillMiniaturize:) name: NSWindowWillMiniaturizeNotification object:nil];
-    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification object: nil];
-    [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(mainSplitViewDidResizeSubviews:) name: NSSplitViewDidResizeSubviewsNotification object:o_split_view];
+    [defaultCenter addObserver: self selector: @selector(someWindowWillClose:) name: NSWindowWillCloseNotification object: nil];
+    [defaultCenter addObserver: self selector: @selector(someWindowWillMiniaturize:) name: NSWindowWillMiniaturizeNotification object:nil];
+    [defaultCenter addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification object: nil];
+    [defaultCenter addObserver: self selector: @selector(mainSplitViewDidResizeSubviews:) name: NSSplitViewDidResizeSubviewsNotification object:o_split_view];
 
     if (b_splitviewShouldBeHidden) {
         [self hideSplitView: YES];
@@ -291,7 +292,7 @@ static VLCMainWindow *sharedInstance = nil;
     }
 
     /* sanity check for the window size */
-    NSRect frame = [self frame];
+    frame = [self frame];
     NSSize screenSize = [[self screen] frame].size;
     if (screenSize.width <= frame.size.width || screenSize.height <= frame.size.height) {
         self.nativeVideoSize = screenSize;



More information about the vlc-commits mailing list