aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryController.m
diff options
context:
space:
mode:
authorMarius Ursache <bamse16@yahoo.com>2013-11-11 20:43:27 +1100
committerMarius Ursache <bamse16@yahoo.com>2013-11-11 20:43:27 +1100
commit5f6729844ad2af23f006153150f3d41ab71634c1 (patch)
tree59436c342f0f1ed0207f59606508b431c9352aaa /Source/SPQueryController.m
parentc769bd0a420bdd1273c43b91b28a818bfd5f5008 (diff)
downloadsequelpro-5f6729844ad2af23f006153150f3d41ab71634c1.tar.gz
sequelpro-5f6729844ad2af23f006153150f3d41ab71634c1.tar.bz2
sequelpro-5f6729844ad2af23f006153150f3d41ab71634c1.zip
Updated ConsoleLog panel sheet to 10.6 code
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r--Source/SPQueryController.m20
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index 929de617..8febfd2b 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -228,7 +228,13 @@ static SPQueryController *sharedQueryController = nil;
[panel setAccessoryView:saveLogView];
- [panel beginSheetForDirectory:nil file:NSLocalizedString(@"ConsoleLog", @"Console : Save as : Initial filename") modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
+ [panel setNameFieldStringValue:NSLocalizedString(@"ConsoleLog", @"Console : Save as : Initial filename")];
+ [panel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger returnCode) {
+ if (returnCode == NSOKButton) {
+ [[self _getConsoleStringWithTimeStamps:[includeTimeStampsButton state]
+ connections:[includeConnectionButton state]] writeToFile:[[panel URL] path] atomically:YES encoding:NSUTF8StringEncoding error:NULL];
+ }
+ }];
#endif
}
@@ -310,18 +316,6 @@ static SPQueryController *sharedQueryController = nil;
#endif
}
-/**
- * Called when the NSSavePanel sheet ends. Writes the console's current content to the selected file if required.
- */
-- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
-{
-#ifndef SP_CODA
- if (returnCode == NSOKButton) {
- [[self _getConsoleStringWithTimeStamps:[includeTimeStampsButton state] connections:[includeConnectionButton state]] writeToFile:[[sheet URL] path] atomically:YES encoding:NSUTF8StringEncoding error:NULL];
- }
-#endif
-}
-
#pragma mark -
#pragma mark Other