aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPQueryConsole.m8
-rw-r--r--Source/TableDocument.m8
2 files changed, 11 insertions, 5 deletions
diff --git a/Source/SPQueryConsole.m b/Source/SPQueryConsole.m
index ffae7479..7b7edccb 100644
--- a/Source/SPQueryConsole.m
+++ b/Source/SPQueryConsole.m
@@ -306,14 +306,12 @@ static SPQueryConsole *sharedQueryConsole = nil;
* Menu item validation for console table view contextual menu.
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
-{
- BOOL validate = NO;
-
+{
if ([menuItem action] == @selector(copy:)) {
- validate = ([consoleTableView numberOfSelectedRows] > 0);
+ return ([consoleTableView numberOfSelectedRows] > 0);
}
- return validate;
+ return [[self window] validateMenuItem:menuItem];
}
/**
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 142fa0c8..7585ed34 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -610,6 +610,14 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
[[[SPQueryConsole sharedQueryConsole] window] setIsVisible:![[[SPQueryConsole sharedQueryConsole] window] isVisible]];
}
+/**
+ * Clears the console by removing all of its messages
+ */
+- (void)clearConsole:(id)sender
+{
+ [[SPQueryConsole sharedQueryConsole] clearConsole:sender];
+}
+
#pragma mark Encoding Methods
/**