aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPIndexesController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-04-14 00:23:22 +0000
committerrowanbeentje <rowan@beent.je>2011-04-14 00:23:22 +0000
commitad7328e56541556d23f527303deddaefd4253ef2 (patch)
tree344dbe7ac1780cfa81952be0cdb34ef20ca7f7bd /Source/SPIndexesController.m
parent0ce916eb0583ec6b062786f91bee0133906671ce (diff)
downloadsequelpro-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/SPIndexesController.m')
-rw-r--r--Source/SPIndexesController.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index 21320897..9c0c03a6 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -235,7 +235,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
// Begin the sheet
[NSApp beginSheet:[self window]
- modalForWindow:[NSApp keyWindow]
+ modalForWindow:[dbDocument parentWindow]
modalDelegate:self
didEndSelector:@selector(addIndexSheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];
@@ -293,7 +293,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
[[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask];
[[buttons objectAtIndex:1] setKeyEquivalent:@"\r"];
- [alert beginSheetModalForWindow:[NSApp keyWindow] modalDelegate:self didEndSelector:@selector(removeIndexSheetDidEnd:returnCode:contextInfo:) contextInfo:(hasForeignKey) ? @"removeIndexAndForeignKey" : @"removeIndex"];
+ [alert beginSheetModalForWindow:[dbDocument parentWindow] modalDelegate:self didEndSelector:@selector(removeIndexSheetDidEnd:returnCode:contextInfo:) contextInfo:(hasForeignKey) ? @"removeIndexAndForeignKey" : @"removeIndex"];
}
/**
@@ -795,7 +795,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
// Check for errors, but only if the query wasn't cancelled
if ([connection queryErrored] && ![connection queryCancelled]) {
- SPBeginAlertSheet(NSLocalizedString(@"Unable to add index", @"add index error message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp keyWindow], self, nil, nil,
+ SPBeginAlertSheet(NSLocalizedString(@"Unable to add index", @"add index error message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [dbDocument parentWindow], self, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to add the index.\n\nMySQL said: %@", @"add index error informative message"), [connection getLastErrorMessage]]);
}
else {