mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Fixes from Matt Stevens: "For background applications (menu bar, completely UI-less, etc) there are a couple of issues with Sparkle notifications: - When prompts such as the initial prompt to enable update checking are displayed they can be hidden behind other windows since the background app is not in focus. This can cause problems, as these prompts run modally and can stop the application from functioning without the user knowing why. - If the update notification window is displayed and the user clicks away to another application, the window disappears and there is no way to get it back since there is no other UI to cause the app to activate. In this case the update should probably operate as a standard window since it is effectively operating as the application's UI."
26 lines
784 B
Objective-C
26 lines
784 B
Objective-C
//
|
|
// SUWindowController.m
|
|
// Sparkle
|
|
//
|
|
// Created by Andy Matuschak on 2/13/08.
|
|
// Copyright 2008 Andy Matuschak. All rights reserved.
|
|
//
|
|
|
|
#import "SUWindowController.h"
|
|
|
|
@implementation SUWindowController
|
|
|
|
- (id)initWithHost:(SUHost *)host 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 = [[host sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
|
|
NSBundle *framework = [NSBundle bundleWithPath:frameworkPath];
|
|
path = [framework pathForResource:nibName ofType:@"nib"];
|
|
}
|
|
return [super initWithWindowNibPath:path owner:self];
|
|
}
|
|
|
|
@end
|