Use [NSApplication sharedApplication] instead to match master

This commit is contained in:
Zorg committed 2016-12-26 21:07:21 -05:00
1 parent 65c0c1e7fe
commit 29ef0150b5
4 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -90,7 +90,7 @@
// 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 ([SUApplicationInfo isBackgroundApplication:NSApp]) {
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
[self.activeUpdateAlert.window setHidesOnDeactivate:NO];
[NSApp activateIgnoringOtherApps:YES];
@@ -210,7 +210,7 @@
// For background applications, obtain focus.
// Useful if the update check is requested from another app like System Preferences.
if ([SUApplicationInfo isBackgroundApplication:NSApp])
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]])
{
[NSApp activateIgnoringOtherApps:YES];
}
@@ -283,7 +283,7 @@
// When showing a modal alert we need to ensure that background applications
// are focused to inform the user since there is no dock icon to notify them.
if ([SUApplicationInfo isBackgroundApplication:NSApp]) { [NSApp activateIgnoringOtherApps:YES]; }
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; }
[alert setIcon:[SUApplicationInfo bestIconForBundle:self.host.bundle]];
[alert runModal];
+1 -1
View File
@@ -63,7 +63,7 @@
// If this is a background application we need to focus it in order to bring the prompt
// to the user's attention. Otherwise the prompt would be hidden behind other applications and
// the user would not know why the application was paused.
if ([SUApplicationInfo isBackgroundApplication:NSApp]) {
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
}
+1 -1
View File
@@ -43,7 +43,7 @@
- (void)windowDidLoad
{
if ([SUApplicationInfo isBackgroundApplication:NSApp]) {
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
[[self window] setLevel:NSFloatingWindowLevel];
}
+1 -1
View File
@@ -245,7 +245,7 @@
[self.window setFrameAutosaveName: showReleaseNotes ? @"SUUpdateAlert" : @"SUUpdateAlertSmall" ];
if ([SUApplicationInfo isBackgroundApplication:NSApp]) {
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
[self.window setLevel:NSFloatingWindowLevel]; // This means the window will float over all other apps, if our app is switched out ?!
}