aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-12-16 12:58:44 +0000
committerBibiko <bibiko@eva.mpg.de>2010-12-16 12:58:44 +0000
commitadd2eb659aae82a187e8b51e19af9a201f08a1ca (patch)
tree19684fbbef0508212e3391b68da31b9914f6e6c6 /Source
parent418ab5876c0a278ed0e2b86d5215739f95bc6add (diff)
downloadsequelpro-add2eb659aae82a187e8b51e19af9a201f08a1ca.tar.gz
sequelpro-add2eb659aae82a187e8b51e19af9a201f08a1ca.tar.bz2
sequelpro-add2eb659aae82a187e8b51e19af9a201f08a1ca.zip
• in HTML output window hyperlink references which begin with file:// will reveal that file in Finder
• in SPCopyTable for tab-delimited row data replace \t by ⇥ and \n by ↵ if they occur in data cells for convenience
Diffstat (limited to 'Source')
-rw-r--r--Source/SPBundleHTMLOutputController.m8
-rw-r--r--Source/SPCopyTable.m2
2 files changed, 8 insertions, 2 deletions
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"];
}