diff options
author | rowanbeentje <rowan@beent.je> | 2011-04-14 00:23:22 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-04-14 00:23:22 +0000 |
commit | ad7328e56541556d23f527303deddaefd4253ef2 (patch) | |
tree | 344dbe7ac1780cfa81952be0cdb34ef20ca7f7bd /Source/SPDatabaseDocument.m | |
parent | 0ce916eb0583ec6b062786f91bee0133906671ce (diff) | |
download | sequelpro-ad7328e56541556d23f527303deddaefd4253ef2.tar.gz sequelpro-ad7328e56541556d23f527303deddaefd4253ef2.tar.bz2 sequelpro-ad7328e56541556d23f527303deddaefd4253ef2.zip |
Make some minor changes after reviewing r3271:
- Fix a few encoding issues
- Recode a few [NSApp keyWindow] uses back to [SPDatabaseDocument parentWindow] following discussion; possibly for later refactoring into use of an error method
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index c19e4e0d..e81a7c05 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -1338,7 +1338,7 @@ - (void) centerTaskWindow { NSPoint newBottomLeftPoint; - NSRect mainWindowRect = [[NSApp keyWindow] frame]; + NSRect mainWindowRect = [parentWindow frame]; NSRect taskWindowRect = [taskProgressWindow frame]; newBottomLeftPoint.x = roundf(mainWindowRect.origin.x + mainWindowRect.size.width/2 - taskWindowRect.size.width/2); @@ -2353,7 +2353,7 @@ */ - (BOOL)couldCommitCurrentViewActions { - [[NSApp keyWindow] endEditingFor:nil]; + [parentWindow endEditingFor:nil]; switch ([tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]]) { // Table structure view @@ -5777,7 +5777,7 @@ // Update the database list [[self onMainThread] setDatabases:self]; - SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp keyWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Unable to select database %@.\nPlease check you have the necessary privileges to view the database, and that the database still exists.", @"message of panel when connection to db failed after selecting from popupbutton"), targetDatabaseName]); + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Unable to select database %@.\nPlease check you have the necessary privileges to view the database, and that the database still exists.", @"message of panel when connection to db failed after selecting from popupbutton"), targetDatabaseName]); } [taskPool drain]; |