aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryConsole.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-20 23:17:40 +0000
committerrowanbeentje <rowan@beent.je>2009-04-20 23:17:40 +0000
commit11ba7147b22f2ed51a33e3ecce72b93ce66f5254 (patch)
tree88ddcb72ac6a103b5c9972336cc6b0abfc11a33a /Source/SPQueryConsole.m
parentdf1a52e8bde8da8f8dbd58d50c2db45ab8102a5c (diff)
downloadsequelpro-11ba7147b22f2ed51a33e3ecce72b93ce66f5254.tar.gz
sequelpro-11ba7147b22f2ed51a33e3ecce72b93ce66f5254.tar.bz2
sequelpro-11ba7147b22f2ed51a33e3ecce72b93ce66f5254.zip
- Save the state of the "Show timestamps" and "Show SELECT/SHOW statements" options for the console in the user preferences
Diffstat (limited to 'Source/SPQueryConsole.m')
-rw-r--r--Source/SPQueryConsole.m12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPQueryConsole.m b/Source/SPQueryConsole.m
index 1bfcd620..63fbee18 100644
--- a/Source/SPQueryConsole.m
+++ b/Source/SPQueryConsole.m
@@ -110,11 +110,14 @@ static SPQueryConsole *sharedQueryConsole = nil;
- (void)release { }
/**
- * Set the window's auto save name.
+ * Set the window's auto save name and initialise display
*/
- (void)awakeFromNib
{
[self setWindowFrameAutosaveName:CONSOLE_WINDOW_AUTO_SAVE_NAME];
+ [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:![[NSUserDefaults standardUserDefaults] boolForKey:@"ConsoleShowTimestamps"]];
+ showSelectStatementsAreDisabled = ![[NSUserDefaults standardUserDefaults] boolForKey:@"ConsoleShowSelectsAndShows"];
+ [self _updateFilterState];
}
/**
@@ -201,18 +204,15 @@ static SPQueryConsole *sharedQueryConsole = nil;
- (IBAction)toggleShowTimeStamps:(id)sender
{
[[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:([sender state])];
- [showTimeStampsMenuItem setState:![sender state]];
}
/**
* Toggles the hiding of messages containing SELECT and SHOW statements
*/
- (IBAction)toggleShowSelectShowStatements:(id)sender
-{
- showSelectStatementsAreDisabled = [sender state];
-
+{
// Store the state of the toggle for later quick reference
- [showSelectShowStatementsMenuItem setState:!showSelectStatementsAreDisabled];
+ showSelectStatementsAreDisabled = [sender state];
[self _updateFilterState];
}