aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 56ca2422..ef0958ab 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -100,6 +100,9 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
[prefs addObserver:tableContentInstance forKeyPath:@"DisplayTableViewVerticalGridlines" options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:customQueryInstance forKeyPath:@"DisplayTableViewVerticalGridlines" options:NSKeyValueObservingOptionNew context:NULL];
+ // Register observers for when the preference changes
+ [prefs addObserver:[SPQueryConsole sharedQueryConsole] forKeyPath:@"ConsoleEnableLogging" options:NSKeyValueObservingOptionNew context:NULL];
+
// Register double click for the favorites view (double click favorite to connect)
[connectFavoritesTableView setTarget:self];
[connectFavoritesTableView setDoubleAction:@selector(initiateConnection:)];
@@ -2300,7 +2303,9 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
*/
- (void)willQueryString:(NSString *)query
{
- [[SPQueryConsole sharedQueryConsole] showMessageInConsole:query];
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"ConsoleEnableLogging"]) {
+ [[SPQueryConsole sharedQueryConsole] showMessageInConsole:query];
+ }
}
/**