mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Actually added the appropriate files this time.
This commit is contained in:
1 parent
1462087cc6
commit
6fd1422eea
3 files changed
+45
-1
No files matched your search
@@ -11,7 +11,7 @@
|
||||
|
||||
#import "Sparkle.h"
|
||||
|
||||
@interface SUUpdatePermissionPrompt : NSWindowController {
|
||||
@interface SUUpdatePermissionPrompt : SUWindowController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user