Skip to content

Commit

Permalink
Bringing the new WindowController into AppDelegate.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanveloso committed Feb 29, 2012
1 parent e0fc51a commit a768436
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Classes/AppDelegate.m
Expand Up @@ -10,6 +10,7 @@

#import "INAppStoreWindow.h"
#import "NSString+base64.h"
#import "WindowController.h"

#import <AVFoundation/AVFoundation.h>
#import <CoreAudio/CoreAudio.h>
Expand All @@ -18,6 +19,10 @@

NSString *const AppDelegateHTMLImagePlaceholder = @"{{ image_url }}";

@interface AppDelegate ()
@property (nonatomic, retain) WindowController *windowController;
@end

@implementation AppDelegate

@synthesize windowController = _windowController;
Expand Down Expand Up @@ -68,17 +73,15 @@ - (void)setTheLoopCount:(NSUInteger)theLoopCount

- (void)awakeFromNib
{
// Set us up as the delegate of the webView for relevant events.
[[self coverWebView] setUIDelegate:self];
[[self coverWebView] setFrameLoadDelegate:self];
[[self coverWebView] setEditingDelegate:self];

// Load our blank cover, since we obviously have no audio to play.
[self injectCoverArtWithIdentifier:@"cover.jpg"];
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[self setWindowController:[WindowController windowController]];
[[self windowController] showWindow:self];

// Basic implementation of the default loop count.
// Infinity = 31 until further notice.
[self setLoopInfiniteCount:31];
Expand Down

0 comments on commit a768436

Please sign in to comment.