diff options
author | Max <post@wickenrode.com> | 2014-11-11 02:47:32 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-11-11 02:47:32 +0100 |
commit | 69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9 (patch) | |
tree | c8beabbf65afbaa3afa6dff27e4a9151a2015909 /Source/SPUserManager.h | |
parent | 6d48720a8279e7e97e9a225aab34c0688abd8e00 (diff) | |
download | sequelpro-69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9.tar.gz sequelpro-69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9.tar.bz2 sequelpro-69ca4afe9ba4c9c710b69e4d22d32d22a007c8a9.zip |
Attempt to fix #1961
Namely this commit changes two things:
1) In the past the user manager window technically was closed after it was released (SPUserManager.m:491):
[NSApp endSheet:[self window] returnCode:0]; //-> calls delegate, which calls release
[[self window] orderOut:self];
This call order has now been swapped.
2) Because the delegate is invoked directly by NSApp, the release was called before other UI elements had finished their cleanup from orderOut:. The delegate callback is now put on the runloop to give other stuff priority.
Requesting QA on this commit.
Diffstat (limited to 'Source/SPUserManager.h')
-rw-r--r-- | Source/SPUserManager.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h index 425c13a6..0058620a 100644 --- a/Source/SPUserManager.h +++ b/Source/SPUserManager.h @@ -124,4 +124,12 @@ - (BOOL)grantPrivilegesToUser:(NSManagedObject *)user; - (BOOL)grantDbPrivilegesWithPrivilege:(NSManagedObject *)user; +// External +/** + * Display the user manager as a sheet attached to a chosen window + * @param docWindow The parent window. + * @param callback A callback that will be called once the window is closed again. Can be NULL. + */ +- (void)beginSheetModalForWindow:(NSWindow *)docWindow completionHandler:(void (^)())callback; + @end |