aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-19 23:37:15 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-19 23:37:15 +0000
commitb2461e0658f6deebf2b4a24e261fadb99f5125c6 (patch)
treefea57ce1afb8986d4b20c2abfd27ebd4b6ca36d5 /Source/SPQueryController.m
parent10990abb16783d89e5314549883fc1e5acc2e407 (diff)
downloadsequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.gz
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.bz2
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.zip
Tidy up.
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r--Source/SPQueryController.m22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index 73ba97ed..80e93a4a 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -32,10 +32,10 @@
#define MESSAGE_TRUNCATE_CHARACTER_LENGTH 256
-// Table view column identifiers
-#define TABLEVIEW_MESSAGE_COLUMN_IDENTIFIER @"message"
-#define TABLEVIEW_DATE_COLUMN_IDENTIFIER @"messageDate"
-#define TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER @"messageConnection"
+// Table view column identifier constants
+static const NSString *SPTableViewMessageColumnID = @"message";
+static const NSString *SPTableViewDateColumnID = @"messageDatw";
+static const NSString *SPTableViewConnectionColumnID = @"messageConnection";
@interface SPQueryController (PrivateAPI)
@@ -164,8 +164,8 @@ static SPQueryController *sharedQueryController = nil;
[self setWindowFrameAutosaveName:@"QueryConsole"];
// Show/hide table columns
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:![prefs boolForKey:SPConsoleShowTimestamps]];
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER] setHidden:![prefs boolForKey:SPConsoleShowConnections]];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] setHidden:![prefs boolForKey:SPConsoleShowTimestamps]];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] setHidden:![prefs boolForKey:SPConsoleShowConnections]];
showSelectStatementsAreDisabled = ![prefs boolForKey:SPConsoleShowSelectsAndShows];
showHelpStatementsAreDisabled = ![prefs boolForKey:SPConsoleShowHelps];
@@ -211,8 +211,8 @@ static SPQueryController *sharedQueryController = nil;
NSUInteger i = [rows firstIndex];
- BOOL dateColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] isHidden];
- BOOL connectionColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER] isHidden];
+ BOOL dateColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] isHidden];
+ BOOL connectionColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] isHidden];
[string setString:@""];
@@ -278,7 +278,7 @@ static SPQueryController *sharedQueryController = nil;
*/
- (IBAction)toggleShowTimeStamps:(id)sender
{
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:([sender state])];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] setHidden:([sender state])];
}
/**
@@ -286,7 +286,7 @@ static SPQueryController *sharedQueryController = nil;
*/
- (IBAction)toggleShowConnections:(id)sender
{
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER] setHidden:([sender state])];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] setHidden:([sender state])];
}
/**
@@ -365,7 +365,7 @@ static SPQueryController *sharedQueryController = nil;
id object = [[messagesVisibleSet objectAtIndex:row] valueForKey:[tableColumn identifier]];
- if ([[tableColumn identifier] isEqualToString:TABLEVIEW_DATE_COLUMN_IDENTIFIER]) {
+ if ([[tableColumn identifier] isEqualToString:SPTableViewDateColumnID]) {
returnValue = [dateFormatter stringFromDate:(NSDate *)object];
}