aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionDelegate.m
diff options
context:
space:
mode:
authorsqlprodev <sqlprodev@northofthree.com>2012-03-29 17:46:12 +0000
committersqlprodev <sqlprodev@northofthree.com>2012-03-29 17:46:12 +0000
commita03e23e2208d3d454406add663981aa7e14afa03 (patch)
treea96e6fc5c6226b3e23a3c600d9b9e61b10238a2c /Source/SPConnectionDelegate.m
parentbe01aff987f05191fb1a244482fa1b3ff9c6bccb (diff)
downloadsequelpro-a03e23e2208d3d454406add663981aa7e14afa03.tar.gz
sequelpro-a03e23e2208d3d454406add663981aa7e14afa03.tar.bz2
sequelpro-a03e23e2208d3d454406add663981aa7e14afa03.zip
#ifdef'ing out references to frameworks that are not used in SP_REFACTOR builds
Diffstat (limited to 'Source/SPConnectionDelegate.m')
-rw-r--r--Source/SPConnectionDelegate.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/SPConnectionDelegate.m b/Source/SPConnectionDelegate.m
index cfb4a8df..0d41a3ac 100644
--- a/Source/SPConnectionDelegate.m
+++ b/Source/SPConnectionDelegate.m
@@ -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