Actually added the appropriate files this time.

This commit is contained in:
andym committed 2008-02-14 15:15:24 +00:00
1 parent 1462087cc6
commit 6fd1422eea
3 files changed
+45 -1

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@
#import "Sparkle.h"
@interface SUUpdatePermissionPrompt : NSWindowController {
@interface SUUpdatePermissionPrompt : SUWindowController {
}
+19
View File
@@ -0,0 +1,19 @@
//
// SUWindowController.h
// Sparkle
//
// Created by Andy Matuschak on 2/13/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#ifndef SUWINDOWCONTROLLER_H
#define SUWINDOWCONTROLLER_H
#import <Cocoa/Cocoa.h>
@interface SUWindowController : NSWindowController { }
// We use this instead of plain old NSWindowController initWithWindowNibName so that we'll be able to find the right path when running in a bundle loaded from another app.
- (id)initWithHostBundle:(NSBundle *)hb windowNibName:(NSString *)nibName;
@end
#endif
+25
View File
@@ -0,0 +1,25 @@
//
// SUWindowController.m
// Sparkle
//
// Created by Andy Matuschak on 2/13/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUWindowController.h"
@implementation SUWindowController
- (id)initWithHostBundle:(NSBundle *)hb windowNibName:(NSString *)nibName
{
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:nibName ofType:@"nib"];
if (path == nil) // Slight hack to resolve issues with running Sparkle in debug configurations.
{
NSString *frameworkPath = [[hb sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
NSBundle *framework = [NSBundle bundleWithPath:frameworkPath];
path = [framework pathForResource:nibName ofType:@"nib"];
}
return [super initWithWindowNibPath:path owner:self];
}
@end