mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Activate app if update check is initiated from NSStatusItem (#2950)
This commit is contained in:
1 parent
95533f1811
commit
4b20aee135
1 file changed
+4
-3
Vendored
+4
-3
@@ -548,9 +548,10 @@ static const NSTimeInterval SUShowCheckingForUpdatesTimeDelay = 0.3;
|
||||
[_checkingController beginActionWithTitle:SULocalizedStringFromTableInBundle(@"Checking for updates…", SPARKLE_TABLE, sparkleBundle, nil) maxProgressValue:0.0 statusText:nil];
|
||||
[_checkingController setButtonTitle:SULocalizedStringFromTableInBundle(@"Cancel", SPARKLE_TABLE, sparkleBundle, nil) target:self action:@selector(cancelCheckForUpdates:) isDefault:NO accessibilityIdentifier:@"SUStatusCancel"];
|
||||
|
||||
// For background applications, obtain focus.
|
||||
// Useful if the update check is requested from another app like System Preferences.
|
||||
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
|
||||
// Obtain focus. Useful if:
|
||||
// - The update check is requested from another app (e.g. System Preferences)
|
||||
// - The user triggers the update check from an NSStatusItem (which does not activate the app)
|
||||
if (![NSApp isActive]) {
|
||||
[self _activateApplication];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user