aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorStuart Connolly <stuart02@gmail.com>2014-01-14 19:05:29 +0000
committerStuart Connolly <stuart02@gmail.com>2014-01-14 19:05:29 +0000
commitfc8cc239ab276cf0fc7a7b9ed77369aa9666e06a (patch)
tree568029c742fb30ddaa18450f0d48e1aa6037993e /Source/SPDatabaseDocument.m
parent12c3d328170a182a18280e9c62f78144095adcc0 (diff)
downloadsequelpro-fc8cc239ab276cf0fc7a7b9ed77369aa9666e06a.tar.gz
sequelpro-fc8cc239ab276cf0fc7a7b9ed77369aa9666e06a.tar.bz2
sequelpro-fc8cc239ab276cf0fc7a7b9ed77369aa9666e06a.zip
Add an option to display binary data as hex, while displaying it in blue to distinguish from string data of similar content.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index c4cd6ddf..a57a5bba 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -2589,9 +2589,12 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
- (NSString *)host
{
if ([connectionController type] == SPSocketConnection) return @"localhost";
- NSString *theHost = [connectionController host];
- if (!theHost) theHost = @"";
- return theHost;
+
+ NSString *host = [connectionController host];
+
+ if (!host) host = @"";
+
+ return host;
}
/**
@@ -2602,9 +2605,11 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
if ([connectionController name] && [[connectionController name] length]) {
return [connectionController name];
}
+
if ([connectionController type] == SPSocketConnection) {
return [NSString stringWithFormat:@"%@@localhost", ([connectionController user] && [[connectionController user] length])?[connectionController user]:@"anonymous"];
}
+
return [NSString stringWithFormat:@"%@@%@", ([connectionController user] && [[connectionController user] length])?[connectionController user]:@"anonymous", [connectionController host]?[connectionController host]:@""];
}