From 602aaa6938ade134a9d388f86cecfe0e1d8e7b01 Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Fri, 11 Oct 2013 03:39:57 -0700 Subject: [PATCH] Enter Full Screen menu item and separator are now hidden until the main window wakes and detects toggleFullScreen selector --- Application/AppController.h | 3 +++ Application/AppController.m | 7 ++----- English.lproj/MainMenu.xib | 10 ++++++---- Window/MainWindow.h | 3 ++- Window/MainWindow.m | 11 +++++++---- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Application/AppController.h b/Application/AppController.h index 16b0b779a..71ca54099 100644 --- a/Application/AppController.h +++ b/Application/AppController.h @@ -99,4 +99,7 @@ OSStatus handleHotKey(EventHandlerCallRef nextHandler,EventRef theEvent,void *us - (void)nodeExpanded:(NSNotification*)notification; - (void)nodeCollapsed:(NSNotification*)notification; +- (void)windowDidEnterFullScreen:(NSNotification *)notification; +- (void)windowDidExitFullScreen:(NSNotification *)notification; + @end diff --git a/Application/AppController.m b/Application/AppController.m index a226edd81..8652195f9 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -275,9 +275,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [playbackController seek:[NSNumber numberWithDouble:[[NSUserDefaults standardUserDefaults] floatForKey:@"lastTrackPosition"]]]; } - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enterFullscreen) name:NSWindowDidEnterFullScreenNotification object:mainWindow]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitFullscreen) name:NSWindowDidExitFullScreenNotification object:mainWindow]; - // We need file tree view to restore its state here // so attempt to access file tree view controller's root view // to force it to read nib and create file tree view for us @@ -584,7 +581,7 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ } } -- (void)enterFullscreen +- (void)windowDidEnterFullScreen:(NSNotification *)notification { NSLog(@"Entering fullscreen"); if (nil == nowPlaying) @@ -611,7 +608,7 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ } } -- (void)exitFullscreen +- (void)windowDidExitFullScreen:(NSNotification *)notification { NSLog(@"Exiting fullscreen"); if (nowPlaying) diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 154348499..6df6d2fde 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -82,7 +82,7 @@ - + @@ -552,6 +552,8 @@ + + @@ -924,8 +926,8 @@ - - +