Permalink
Browse files

Sparkle now correctly relaunches WebKit instead of Safari after insta…

…lling an update

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information...
1 parent 6b60d2d commit e8dadfdeae394bee6bd7e36bc208390a515f4a5d Simone Manganelli committed with May 5, 2009
Showing with 11 additions and 2 deletions.
  1. +5 −1 Plugin/Plugin.m
  2. +3 −0 SparkleManager.h
  3. +3 −1 SparkleManager.m
View
6 Plugin/Plugin.m
@@ -90,7 +90,11 @@ - (id) initWithArguments:(NSDictionary *)arguments
{
self = [super init];
if (self) {
- [[SparkleManager sharedManager] startAutomaticallyCheckingForUpdates];
+ SparkleManager *sharedSparkleManager = [SparkleManager sharedManager];
+ NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace];
+ NSString *pathToRelaunch = [sharedWorkspace absolutePathForAppBundleWithIdentifier:[self launchedAppBundleIdentifier]];
+ [sharedSparkleManager setPathToRelaunch:pathToRelaunch];
+ [sharedSparkleManager startAutomaticallyCheckingForUpdates];
if (![[NSUserDefaults standardUserDefaults] objectForKey:sAutoLoadInvisibleFlashViewsKey]) {
// Default to auto-loading invisible flash views.
View
3 SparkleManager.h
@@ -31,6 +31,7 @@
@interface SparkleManager : NSObject {
SUUpdater *_updater;
BOOL _canUpdate;
+ NSString *_pathToRelaunch;
}
+ (id)sharedManager;
@@ -39,4 +40,6 @@
- (void)startAutomaticallyCheckingForUpdates;
- (void)checkForUpdates;
+@property (retain) NSString *pathToRelaunch;
+
@end
View
4 SparkleManager.m
@@ -117,7 +117,9 @@ - (void)checkForUpdates {
}
- (NSString*)pathToRelaunchForUpdater:(SUUpdater*)updater {
- return [[NSBundle mainBundle] bundlePath];
+ return _pathToRelaunch;
}
+@synthesize pathToRelaunch = _pathToRelaunch;
+
@end

0 comments on commit e8dadfd

Please sign in to comment.