aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/PreferenceDefaults.plist36
-rw-r--r--Source/CMMCPConnection.h1
-rw-r--r--Source/CMMCPConnection.m7
-rw-r--r--Source/CustomQuery.m8
4 files changed, 31 insertions, 21 deletions
diff --git a/Resources/PreferenceDefaults.plist b/Resources/PreferenceDefaults.plist
index f89eb7d8..ac2af799 100644
--- a/Resources/PreferenceDefaults.plist
+++ b/Resources/PreferenceDefaults.plist
@@ -2,35 +2,43 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>ConnectionTimeoutValue</key>
- <integer>60</integer>
<key>DefaultEncoding</key>
<string>Autodetect</string>
- <key>FetchCorrectRowCount</key>
+ <key>UseMonospacedFonts</key>
+ <false/>
+ <key>ReloadAfterAddingRow</key>
<true/>
- <key>GrowlEnabled</key>
+ <key>ReloadAfterEditingRow</key>
+ <true/>
+ <key>ReloadAfterRemovingRow</key>
+ <false/>
+ <key>LoadBlobsAsNeeded</key>
+ <false/>
+ <key>FetchCorrectRowCount</key>
<true/>
<key>LimitResults</key>
<true/>
<key>LimitResultsValue</key>
<integer>1000</integer>
- <key>LoadBlobsAsNeeded</key>
- <true/>
<key>NullValue</key>
<string>NULL</string>
- <key>ReloadAfterAddingRow</key>
- <true/>
- <key>ReloadAfterEditingRow</key>
- <true/>
- <key>ReloadAfterRemovingRow</key>
- <false/>
<key>ShowNoAffectedRowsError</key>
<true/>
+ <key>GrowlEnabled</key>
+ <true/>
+ <key>ConnectionTimeoutValue</key>
+ <integer>10</integer>
<key>UseKeepAlive</key>
<true/>
<key>KeepAliveInterval</key>
- <integer>0</integer>
- <key>UseMonospacedFonts</key>
+ <integer>60</integer>
+ <key>CustomQueryEditorFont</key>
+ <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAZOU0ZvbnQehIQITlNPYmplY3QAhYQBaUCEBVs2NGNdBgAAADgAAAD//kIAaQB0AHMAdAByAGUAYQBtAFYAZQByAGEAUwBhAG4AcwBNAG8AbgBvAC0AUgBvAG0AYQBuAIQBZguEAWMAmAGYAJgAhg==</data>
+ <key>CustomQueryAutoindent</key>
+ <true/>
+ <key>CustomQueryAutopair</key>
+ <true/>
+ <key>CustomQueryAutouppercaseKeywords</key>
<false/>
</dict>
</plist>
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]];
}