aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPConnectionController.m4
-rw-r--r--Source/SPConnectionHandler.m8
-rw-r--r--Source/SPWindowController.m2
3 files changed, 6 insertions, 8 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 62767fe8..4b7db791 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -939,9 +939,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
id newObject = [change objectForKey:NSKeyValueChangeNewKey];
if (oldObject != newObject) {
- NSMutableDictionary *favorite = [self selectedFavorite];
-
- [favorite setObject:(newObject) ? newObject : @"" forKey:keyPath];
+ [[self selectedFavorite] setObject:(newObject) ? newObject : @"" forKey:keyPath];
// Save the new data to disk
[favoritesController saveFavorites];
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m
index ccdad4d1..4ce34c44 100644
--- a/Source/SPConnectionHandler.m
+++ b/Source/SPConnectionHandler.m
@@ -30,6 +30,8 @@
#import "SPKeychain.h"
#import "RegexKitLite.h"
+static NSString *SPLocalhostAddress = @"127.0.0.1";
+
@interface SPConnectionController ()
- (void)_restoreConnectionInterface;
@@ -69,7 +71,7 @@
}
else {
if ([self type] == SPSSHTunnelConnection) {
- mySQLConnection = [[MCPConnection alloc] initToHost:@"127.0.0.1"
+ mySQLConnection = [[MCPConnection alloc] initToHost:SPLocalhostAddress
withLogin:[self user]
usingPort:[sshTunnel localPort]];
[mySQLConnection setConnectionProxy:sshTunnel];
@@ -427,12 +429,12 @@
// Change connection details
[self setPort:tunnelPort];
- [self setHost:@"127.0.0.1"];
+ [self setHost:SPLocalhostAddress];
// Change to standard TCP/IP connection view
[self resizeTabViewToConnectionType:SPTCPIPConnection animating:YES];
- // Initiate the connection after half a second to give the connection view a chance to resize
+ // Initiate the connection after a half second delay to give the connection view a chance to resize
[self performSelector:@selector(initiateConnection:) withObject:self afterDelay:0.5];
}
}
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index ca0c816e..282ebda5 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -212,7 +212,6 @@ enum {
*/
- (IBAction) moveSelectedTabInNewWindow:(id)sender
{
-
static NSPoint cascadeLocation = {.x = 0, .y = 0};
SPDatabaseDocument *selectedDocument = [[tabView selectedTabViewItem] identifier];
@@ -275,7 +274,6 @@ enum {
[newWindowController tabView:[tabBar tabView] didDropTabViewItem:[selectedCell representedObject] inTabBar:control];
[newWindow makeKeyAndOrderFront:nil];
-
}
/**