From fc8cc239ab276cf0fc7a7b9ed77369aa9666e06a Mon Sep 17 00:00:00 2001 From: Stuart Connolly Date: Tue, 14 Jan 2014 19:05:29 +0000 Subject: Add an option to display binary data as hex, while displaying it in blue to distinguish from string data of similar content. --- Source/SPDatabaseDocument.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Source/SPDatabaseDocument.m') 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]:@""]; } -- cgit v1.2.3