Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit e8dadfdeae394bee6bd7e36bc208390a515f4a5d 1 parent 6b60d2d
Simone Manganelli authored committed
Showing with 11 additions and 2 deletions.
  1. +5 −1 Plugin/Plugin.m
  2. +3 −0  SparkleManager.h
  3. +3 −1 SparkleManager.m
6 Plugin/Plugin.m
View
@@ -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.
3  SparkleManager.h
View
@@ -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
4 SparkleManager.m
View
@@ -117,7 +117,9 @@ - (void)checkForUpdates {
}
- (NSString*)pathToRelaunchForUpdater:(SUUpdater*)updater {
- return [[NSBundle mainBundle] bundlePath];
+ return _pathToRelaunch;
}
+@synthesize pathToRelaunch = _pathToRelaunch;
+
@end
Please sign in to comment.
Something went wrong with that request. Please try again.