aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionDelegate.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-04-16 20:16:52 +0000
committerstuconnolly <stuart02@gmail.com>2012-04-16 20:16:52 +0000
commit4cad6f0e6e4fb497b480256c2abe3de34ebf225c (patch)
treeb66d6a72a1537cf98624acf3c685f1a4d916fd86 /Source/SPConnectionDelegate.m
parent0d3b69f964a8d9d93ca794d457b461463f1ec95d (diff)
downloadsequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.gz
sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.bz2
sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.zip
Bring outline view branch up to date with trunk.
Diffstat (limited to 'Source/SPConnectionDelegate.m')
-rw-r--r--Source/SPConnectionDelegate.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/SPConnectionDelegate.m b/Source/SPConnectionDelegate.m
index 9480a99e..74f1d407 100644
--- a/Source/SPConnectionDelegate.m
+++ b/Source/SPConnectionDelegate.m
@@ -28,7 +28,7 @@
#import "SPQueryController.h"
#import "SPKeychain.h"
#import "SPAlertSheets.h"
-#import "SPMySQLConstants.h"
+#import <SPMySQL/SPMySQLConstants.h>
@implementation SPDatabaseDocument (SPConnectionDelegate)
@@ -40,6 +40,7 @@
*/
- (void)willQueryString:(NSString *)query connection:(id)connection
{
+#ifndef SP_REFACTOR
if ([prefs boolForKey:SPConsoleEnableLogging]) {
if ((_queryMode == SPInterfaceQueryMode && [prefs boolForKey:SPConsoleEnableInterfaceLogging])
|| (_queryMode == SPCustomQueryQueryMode && [prefs boolForKey:SPConsoleEnableCustomQueryLogging])
@@ -48,6 +49,7 @@
[[SPQueryController sharedQueryController] showMessageInConsole:query connection:[self name]];
}
}
+#endif
}
/**
@@ -55,9 +57,11 @@
*/
- (void)queryGaveError:(NSString *)error connection:(id)connection
{
+#ifndef SP_REFACTOR
if ([prefs boolForKey:SPConsoleEnableLogging] && [prefs boolForKey:SPConsoleEnableErrorLogging]) {
[[SPQueryController sharedQueryController] showErrorInConsole:error connection:[self name]];
}
+#endif
}
/**
@@ -127,8 +131,10 @@
// Ensure the window isn't miniaturized
if ([[self parentWindow] isMiniaturized]) [[self parentWindow] deminiaturize:self];
+#ifndef SP_REFACTOR
// Ensure the window and tab are frontmost
[self makeKeyDocument];
+#endif
// Display the connection error dialog and wait for the return code
[NSApp beginSheet:connectionErrorDialog modalForWindow:[self parentWindow] modalDelegate:self didEndSelector:nil contextInfo:nil];
@@ -169,6 +175,7 @@
*/
- (void) closeAndDisconnect
{
+#ifndef SP_REFACTOR
NSWindow *theParentWindow = [self parentWindow];
_isConnected = NO;
if ([[[self parentTabViewItem] tabView] numberOfTabViewItems] == 1) {
@@ -180,6 +187,7 @@
[theParentWindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.6];
}
[self parentTabDidClose];
+#endif
}
@end