Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Use NSWorkspace's method for revealing in finder #225

Merged
merged 1 commit into from
Apr 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions appshell/appshell_extensions_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,7 @@ - (void) timeoutTimer:(NSTimer*)timer

int32 ShowFolderInOSWindow(ExtensionString pathname)
{
NSString* scriptString = [NSString stringWithFormat: @"activate application \"Finder\"\n tell application \"Finder\" to open posix file \"%s\"", pathname.c_str()];
NSAppleScript* script = [[NSAppleScript alloc] initWithSource: scriptString];
NSDictionary* errorDict = nil;
[script executeAndReturnError: &errorDict];
[script release];
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:[NSArray arrayWithObject: [NSURL fileURLWithPath: pathname.c_str()]]];
return NO_ERROR;
}

Expand Down