Activate before no-user alert.
[FIXED] Also activate app before no-user alert.
This commit is contained in:
parent
b4dbb15853
commit
c400868026
2
External/RHStatusItemView
vendored
2
External/RHStatusItemView
vendored
@ -1 +1 @@
|
|||||||
Subproject commit eb8b21e117bfa5747d67394f06df400ac4c94279
|
Subproject commit fa01dea4ec70d12a8b2db48e26b50271451a16e1
|
@ -384,17 +384,15 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)showPasswordWindow:(id)sender {
|
- (IBAction)showPasswordWindow:(id)sender {
|
||||||
|
|
||||||
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
|
|
||||||
// If no user, can't activate.
|
// If no user, can't activate.
|
||||||
if (YES || ![self activeUserForThread]) {
|
if (![self activeUserForThread]) {
|
||||||
[[NSAlert alertWithMessageText:@"No User Selected" defaultButton:[PearlStrings get].commonButtonOkay alternateButton:nil otherButton:nil informativeTextWithFormat:@"Begin by selecting or creating your user from the status menu (●●●|) next to the clock.", nil] runModal];
|
[[NSAlert alertWithMessageText:@"No User Selected" defaultButton:[PearlStrings get].commonButtonOkay alternateButton:nil otherButton:nil informativeTextWithFormat:@"Begin by selecting or creating your user from the status menu (●●●|) next to the clock.", nil] runModal];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activate the app if not active.
|
|
||||||
if (![[NSApplication sharedApplication] isActive])
|
|
||||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
|
||||||
|
|
||||||
// Don't show window if we weren't already running (ie. if we haven't been activated before).
|
// Don't show window if we weren't already running (ie. if we haven't been activated before).
|
||||||
if (!self.passwordWindow)
|
if (!self.passwordWindow)
|
||||||
self.passwordWindow = [[MPPasswordWindowController alloc] initWithWindowNibName:@"MPPasswordWindowController"];
|
self.passwordWindow = [[MPPasswordWindowController alloc] initWithWindowNibName:@"MPPasswordWindowController"];
|
||||||
|
Loading…
Reference in New Issue
Block a user