If you have an issue with any of our projects. feel free to register.

Unverified Commit a8fe9d6a authored by Christopher Snowhill's avatar Christopher Snowhill Committed by GitHub

Merge pull request #76 from nevack/nevack/cleanup-mainwindow

Cleanup dead code in MainWindow and AppController.
parents 17dcf4cc 84b473f8
......@@ -33,8 +33,6 @@
IBOutlet NSButton *randomizeButton;
IBOutlet NSTextField *totalTimeField;
IBOutlet NSDrawer *infoDrawer;
IBOutlet PlaylistView *playlistView;
......@@ -82,10 +80,6 @@
- (IBAction)feedback:(id)sender;
- (IBAction)toggleInfoDrawer:(id)sender;
- (void)drawerDidOpen:(NSNotification *)notification;
- (void)drawerDidClose:(NSNotification *)notification;
- (void)initDefaults;
//Fun stuff
......
......@@ -316,27 +316,6 @@
[theApplication replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
}
- (IBAction)toggleInfoDrawer:(id)sender
{
[mainWindow makeKeyAndOrderFront:self];
[infoDrawer toggle:self];
}
- (void)drawerDidOpen:(NSNotification *)notification
{
if ([notification object] == infoDrawer) {
[infoButton setState:NSOnState];
}
}
- (void)drawerDidClose:(NSNotification *)notification
{
if ([notification object] == infoDrawer) {
[infoButton setState:NSOffState];
}
}
- (IBAction)openLiberapayPage:(id)sender
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://liberapay.com/kode54"]];
......
......@@ -566,6 +566,7 @@
<toolbarItem reference="1533"/>
</defaultToolbarItems>
</toolbar>
<contentBorderThickness minY="22"/>
<connections>
<binding destination="1897" name="title" keyPath="content.display" id="1903">
<dictionary key="options">
......@@ -576,8 +577,6 @@
</binding>
<outlet property="delegate" destination="226" id="481"/>
<outlet property="initialFirstResponder" destination="207" id="720"/>
<outlet property="itemLionFullscreenToggle" destination="2456" id="5yZ-Jj-awr"/>
<outlet property="itemLionSeparator" destination="2455" id="0p5-i7-wLz"/>
<outlet property="playlistView" destination="206" id="mah-wo-1nd"/>
</connections>
<point key="canvasLocation" x="130.5" y="131"/>
......@@ -997,10 +996,10 @@
<action selector="decreaseFontSize:" target="226" id="1872"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" hidden="YES" id="2455">
<menuItem isSeparatorItem="YES" id="2455">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Enter Full Screen" hidden="YES" keyEquivalent="f" id="2456">
<menuItem title="Enter Full Screen" keyEquivalent="f" id="2456">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleFullScreen:" target="-1" id="2457"/>
......
......@@ -9,8 +9,6 @@
#import <Cocoa/Cocoa.h>
@interface MainWindow : NSWindow {
IBOutlet NSMenuItem * itemLionSeparator;
IBOutlet NSMenuItem * itemLionFullscreenToggle;
IBOutlet NSView *playlistView;
}
......
......@@ -13,28 +13,20 @@
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
{
self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
if (self)
{
[self setExcludedFromWindowsMenu:YES];
[self setContentBorderThickness:24.0 forEdge:NSMinYEdge];
self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
if (self)
{
[self setExcludedFromWindowsMenu:YES];
[self setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
return self;
return self;
}
- (void)awakeFromNib
{
if ([self respondsToSelector:@selector(toggleFullScreen:)])
{
[itemLionSeparator setHidden:NO];
[itemLionFullscreenToggle setHidden:NO];
}
[super awakeFromNib];
[playlistView setNextResponder:self];
[super awakeFromNib];
}
@end
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