Enter Full Screen menu item and separator are now hidden until the main window wakes and detects toggleFullScreen selector

CQTexperiment
Chris Moeller 2013-10-11 03:39:57 -07:00
parent 3f35b5e07f
commit 602aaa6938
5 changed files with 20 additions and 14 deletions

View File

@ -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

View File

@ -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)

View File

@ -82,7 +82,7 @@
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<imageCell key="dataCell" controlSize="small" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="9E1EC36B-776F-41F6-84BA-3BCF9937C65D" id="1801">
<imageCell key="dataCell" controlSize="small" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="AE428D9F-3521-44E5-A3BF-1E9BBDE889D6" id="1801">
<font key="font" metaFont="system"/>
</imageCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
@ -552,6 +552,8 @@
</binding>
<outlet property="delegate" destination="226" id="481"/>
<outlet property="initialFirstResponder" destination="207" id="720"/>
<outlet property="itemLionFullscreenToggle" destination="6FK-oo-X6Z" id="AFZ-tU-eoC"/>
<outlet property="itemLionSeparator" destination="LXf-6h-S7b" id="1Bl-jw-Bhi"/>
<outlet property="otherWindow" destination="2234" id="2304"/>
</connections>
</window>
@ -924,8 +926,8 @@
<action selector="decreaseFontSize:" target="226" id="1872"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="LXf-6h-S7b"/>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="6FK-oo-X6Z" userLabel="Menu Item - Enter Full Screen">
<menuItem isSeparatorItem="YES" hidden="YES" id="LXf-6h-S7b"/>
<menuItem title="Enter Full Screen" hidden="YES" keyEquivalent="f" id="6FK-oo-X6Z" userLabel="Menu Item - Enter Full Screen">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleFullScreen:" target="-1" id="UCw-gd-iiw"/>
@ -1651,7 +1653,7 @@ Gw
<customObject id="2434" customClass="FeedbackController"/>
</objects>
<resources>
<image name="9E1EC36B-776F-41F6-84BA-3BCF9937C65D" width="17" height="17">
<image name="AE428D9F-3521-44E5-A3BF-1E9BBDE889D6" width="17" height="17">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGRkdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QDwcI
ExQZHh8qKyw0NzpAQ1UkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5T

View File

@ -10,7 +10,8 @@
#import "DualWindow.h"
@interface MainWindow : DualWindow {
IBOutlet NSMenuItem * itemLionSeparator;
IBOutlet NSMenuItem * itemLionFullscreenToggle;
}
@end

View File

@ -30,10 +30,13 @@
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:[self hiddenDefaultsKey]]];
}
if ([self respondsToSelector:@selector(toggleFullScreen:)])
{
[itemLionSeparator setHidden:NO];
[itemLionFullscreenToggle setHidden:NO];
}
[super awakeFromNib];
}
@end