Sparkle now works correctly with LSUIElements: it focuses them before displaying the update alert. This fixes bug 228471.

This commit is contained in:
Andy Matuschak committed 2008-05-30 21:23:56 -07:00
1 parent fcaf871636
commit de7db2d716
1 file changed
+3
+3
View File
@@ -34,6 +34,9 @@
updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:updateItem hostBundle:hostBundle];
[updateAlert setDelegate:self];
// If the app is a menubar app or the like, we need to focus it first:
if ([[hostBundle objectForInfoDictionaryKey:@"LSUIElement"] doubleValue]) { [NSApp activateIgnoringOtherApps:YES]; }
// Only show the update alert if the app is active; otherwise, we'll wait until it is.
if ([NSApp isActive])
[updateAlert showWindow:self];