mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Dont show update window
This commit is contained in:
1 parent
3f2d37486f
commit
cd57836ca5
1 file changed
+18
-18
Vendored
+18
-18
@@ -70,24 +70,24 @@
|
||||
[[updater delegate] updater:self.updater didFindValidUpdate:self.updateItem];
|
||||
}
|
||||
|
||||
self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) {
|
||||
[self updateAlertFinishedWithChoice:choice];
|
||||
}];
|
||||
|
||||
id<SUVersionDisplay> versDisp = nil;
|
||||
if ([[updater delegate] respondsToSelector:@selector(versionDisplayerForUpdater:)]) {
|
||||
versDisp = [[updater delegate] versionDisplayerForUpdater:self.updater];
|
||||
}
|
||||
[self.updateAlert setVersionDisplayer:versDisp];
|
||||
|
||||
// If the app is a menubar app or the like, we need to focus it first and alter the
|
||||
// update prompt to behave like a normal window. Otherwise if the window were hidden
|
||||
// there may be no way for the application to be activated to make it visible again.
|
||||
if ([self.host isBackgroundApplication]) {
|
||||
[[self.updateAlert window] setHidesOnDeactivate:NO];
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
}
|
||||
|
||||
// self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) {
|
||||
// [self updateAlertFinishedWithChoice:choice];
|
||||
// }];
|
||||
//
|
||||
// id<SUVersionDisplay> versDisp = nil;
|
||||
// if ([[updater delegate] respondsToSelector:@selector(versionDisplayerForUpdater:)]) {
|
||||
// versDisp = [[updater delegate] versionDisplayerForUpdater:self.updater];
|
||||
// }
|
||||
// [self.updateAlert setVersionDisplayer:versDisp];
|
||||
//
|
||||
// // If the app is a menubar app or the like, we need to focus it first and alter the
|
||||
// // update prompt to behave like a normal window. Otherwise if the window were hidden
|
||||
// // there may be no way for the application to be activated to make it visible again.
|
||||
// if ([self.host isBackgroundApplication]) {
|
||||
// [[self.updateAlert window] setHidesOnDeactivate:NO];
|
||||
// [NSApp activateIgnoringOtherApps:YES];
|
||||
// }
|
||||
|
||||
// Only show the update alert if the app is active; otherwise, we'll wait until it is.
|
||||
// if ([NSApp isActive])
|
||||
// [[self.updateAlert window] makeKeyAndOrderFront:self];
|
||||
|
||||
Reference in new issue
Block a user