From fcf471d08f919d7a8eee6cd019e2c18770beb76f Mon Sep 17 00:00:00 2001 From: catlan Date: Sat, 1 Mar 2008 09:22:39 +0000 Subject: [PATCH] runModal like the old alert from Changeset 127. [NSApp runModalForWindow:] calls [window center], so we can remove it. --- SUUpdatePermissionPrompt.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SUUpdatePermissionPrompt.m b/SUUpdatePermissionPrompt.m index 1fb9c9ab..3824a519 100644 --- a/SUUpdatePermissionPrompt.m +++ b/SUUpdatePermissionPrompt.m @@ -30,8 +30,7 @@ + (void)promptWithHostBundle:(NSBundle *)hb delegate:(id)d { id prompt = [[[self class] alloc] initWithHostBundle:hb delegate:d]; - [[prompt window] center]; - [prompt showWindow:self]; + [NSApp runModalForWindow:[prompt window]]; } - (void)awakeFromNib @@ -117,6 +116,7 @@ [[SUUserDefaults standardUserDefaults] setBool:shouldSendProfile forKey:SUSendProfileInfoKey]; [delegate updatePermissionPromptFinishedWithResult:([sender tag] == 1 ? SUAutomaticallyUpdate : SUDoNotAutomaticallyUpdate)]; [[self window] close]; + [NSApp stopModal]; [self autorelease]; }