From add2eb659aae82a187e8b51e19af9a201f08a1ca Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 16 Dec 2010 12:58:44 +0000 Subject: =?UTF-8?q?=E2=80=A2=20in=20HTML=20output=20window=20hyperlink=20r?= =?UTF-8?q?eferences=20which=20begin=20with=20file://=20will=20reveal=20th?= =?UTF-8?q?at=20file=20in=20Finder=20=E2=80=A2=20in=20SPCopyTable=20for=20?= =?UTF-8?q?tab-delimited=20row=20data=20replace=20\t=20by=20=E2=87=A5=20an?= =?UTF-8?q?d=20\n=20by=20=E2=86=B5=20if=20they=20occur=20in=20data=20cells?= =?UTF-8?q?=20for=20convenience?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPBundleHTMLOutputController.m | 8 +++++++- Source/SPCopyTable.m | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index 7cad079b..7bcff455 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -267,7 +267,13 @@ if([[[request URL] scheme] isEqualToString:@"sequelpro"] && navigationType == WebNavigationTypeLinkClicked) { [[NSApp delegate] handleEventWithURL:[request URL]]; [listener ignore]; - } else { + } + // file://a_file_path opens the reveal the file in Finder + else if([[[request URL] scheme] isEqualToString:@"file"] && navigationType == WebNavigationTypeLinkClicked) { + [[NSWorkspace sharedWorkspace] selectFile:[[[request mainDocumentURL] absoluteString] substringFromIndex:6] inFileViewerRootedAtPath:nil]; + [listener ignore]; + } + else { switch(navigationType) { case WebNavigationTypeLinkClicked: diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 6b9383ab..fad9332e 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -228,7 +228,7 @@ NSInteger kBlobAsImageFile = 4; } } else - [result appendFormat:@"%@\t", [cellData description]]; + [result appendFormat:@"%@\t", [[[cellData description] stringByReplacingOccurrencesOfString:@"\n" withString:@"↵"] stringByReplacingOccurrencesOfString:@"\t" withString:@"⇥"]]; } else { [result appendString:@"\t"]; } -- cgit v1.2.3