aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMMCPConnection.h1
-rw-r--r--Source/CMMCPConnection.m7
-rw-r--r--Source/CustomQuery.m8
3 files changed, 9 insertions, 7 deletions
diff --git a/Source/CMMCPConnection.h b/Source/CMMCPConnection.h
index bdda78ec..8473c962 100644
--- a/Source/CMMCPConnection.h
+++ b/Source/CMMCPConnection.h
@@ -47,6 +47,7 @@
NSString *connectionSocket;
float lastQueryExecutionTime;
int connectionTimeout;
+ BOOL useKeepAlive;
float keepAliveInterval;
NSTimer *keepAliveTimer;
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index 9f8c78fa..99b72e42 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -67,9 +67,10 @@ static void forcePingTimeout(int signalNumber);
connectionPort = 0;
connectionSocket = nil;
keepAliveTimer = nil;
- connectionTimeout = [[[NSUserDefaults standardUserDefaults] objectForKey:@"connectionTimeout"] intValue];
+ connectionTimeout = [[[NSUserDefaults standardUserDefaults] objectForKey:@"ConnectionTimeout"] intValue];
if (!connectionTimeout) connectionTimeout = 10;
- keepAliveInterval = [[[NSUserDefaults standardUserDefaults] objectForKey:@"keepAliveInterval"] doubleValue];
+ useKeepAlive = [[[NSUserDefaults standardUserDefaults] objectForKey:@"UseKeepAlive"] doubleValue];
+ keepAliveInterval = [[[NSUserDefaults standardUserDefaults] objectForKey:@"KeepAliveInterval"] doubleValue];
if (!keepAliveInterval) keepAliveInterval = 0;
lastKeepAliveSuccess = nil;
lastQueryExecutionTime = 0;
@@ -637,7 +638,7 @@ static void forcePingTimeout(int signalNumber)
lastKeepAliveSuccess = nil;
}
- if (keepAliveInterval) {
+ if (useKeepAlive && keepAliveInterval) {
keepAliveTimer = [NSTimer
scheduledTimerWithTimeInterval:keepAliveInterval
target:self
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index ba9349f9..9dbd5a20 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -490,7 +490,7 @@ sets the tableView columns corresponding to the mysql-result
[theCol setResizingMask:NSTableColumnUserResizingMask];
NSTextFieldCell *dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease];
[dataCell setEditable:NO];
- if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ if ( [prefs boolForKey:@"UseMonospacedFonts"] ) {
[dataCell setFont:[NSFont fontWithName:@"Monaco" size:10]];
} else {
[dataCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
@@ -636,7 +636,7 @@ sets the connection (received from TableDocument) and makes things that have to
[queryFavoritesView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]];
while ( (column = [enumerator nextObject]) )
{
- if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ if ( [prefs boolForKey:@"UseMonospacedFonts"] ) {
[[column dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]];
} else {
[[column dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
@@ -716,7 +716,7 @@ inserts the query in the textView and performs query
return [tmp autorelease];
}
if ( [[theRow objectAtIndex:[theIdentifier intValue]] isMemberOfClass:[NSNull class]] )
- return [prefs objectForKey:@"nullValue"];
+ return [prefs objectForKey:@"NullValue"];
return [theRow objectAtIndex:[theIdentifier intValue]];
} else if ( aTableView == queryFavoritesView ) {
@@ -875,7 +875,7 @@ opens sheet with value when double clicking on a field
}
[theValue autorelease];
} else if ( [[theRow objectAtIndex:[theIdentifier intValue]] isMemberOfClass:[NSNull class]] ) {
- theValue = [prefs objectForKey:@"nullValue"];
+ theValue = [prefs objectForKey:@"NullValue"];
} else {
theValue = [theRow objectAtIndex:[theIdentifier intValue]];
}