Fix invalid parameter error on check for updates

reason: Invalid parameter not satisfying: windowNibPath

See https://github.com/sparkle-project/Sparkle/issues/237#issuecomment-11618894
This commit is contained in:
Daniel Miller committed 2014-12-31 00:17:46 -05:00
1 parent 0b186dc939
commit a8d96e0dce
6 files changed
+7 -14

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost delegate:(id<SUAutomaticUpdateAlertDelegate>)del
{
self = [super initWithHost:aHost windowNibName:@"SUAutomaticUpdateAlert"];
self = [super initWithWindowNibName:@"SUAutomaticUpdateAlert"];
if (self)
{
self.updateItem = item;
+1 -1
View File
@@ -31,7 +31,7 @@
- (instancetype)initWithHost:(SUHost *)aHost
{
self = [super initWithHost:aHost windowNibName:@"SUStatus"];
self = [super initWithWindowNibName:@"SUStatus"];
if (self)
{
self.host = aHost;
+1 -1
View File
@@ -54,7 +54,7 @@
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost
{
self = [super initWithHost:host windowNibName:@"SUUpdateAlert"];
self = [super initWithWindowNibName:@"SUUpdateAlert"];
if (self)
{
host = aHost;
+1 -1
View File
@@ -45,7 +45,7 @@
- (instancetype)initWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id<SUUpdatePermissionPromptDelegate>)d
{
self = [super initWithHost:aHost windowNibName:@"SUUpdatePermissionPrompt"];
self = [super initWithWindowNibName:@"SUUpdatePermissionPrompt"];
if (self)
{
host = aHost;
+1 -1
View File
@@ -14,7 +14,7 @@
@class SUHost;
@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.
- (instancetype)initWithHost:(SUHost *)host windowNibName:(NSString *)nibName;
- (instancetype)initWithWindowNibName:(NSString *)nibName;
@end
#endif
+2 -9
View File
@@ -11,16 +11,9 @@
@implementation SUWindowController
- (instancetype)initWithHost:(SUHost *)host windowNibName:(NSString *)nibName
- (instancetype)initWithWindowNibName:(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 = [[[host bundle] sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
NSBundle *framework = [NSBundle bundleWithPath:frameworkPath];
path = [framework pathForResource:nibName ofType:@"nib"];
}
self = [super initWithWindowNibPath:path owner:self];
self = [super initWithWindowNibName:nibName owner:self];
return self;
}