TextMate is a graphical text editor for OS X 10.7+
Revision | caf77cc40c1598cf6ccf2ca1d0b9b3d053348780 (tree) |
---|---|
Time | 2012-08-22 22:01:38 |
Author | Jacob Bandes-Storch <jtbandes@gmai...> |
Commiter | Allan Odgaard |
⌘+click a file browser icon to show in Finder
@@ -343,7 +343,7 @@ static NSSet* VisibleItems (NSOutlineView* outlineView, FSItem* root, NSMutableS | ||
343 | 343 | { |
344 | 344 | OFBPathInfoCell* cell = (OFBPathInfoCell*)[anOutlineView preparedCellAtColumn:col row:row]; |
345 | 345 | NSInteger hit = [cell hitTestForEvent:[NSApp currentEvent] inRect:[anOutlineView frameOfCellAtColumn:col row:row] ofView:anOutlineView]; |
346 | - if((hit & OakImageAndTextCellHitImage) && !([[NSApp currentEvent] modifierFlags] & NSCommandKeyMask)) | |
346 | + if(hit & OakImageAndTextCellHitImage) | |
347 | 347 | return NO; |
348 | 348 | else if(hit & NSCellHitTrackableArea) |
349 | 349 | return NO; |
@@ -272,9 +272,11 @@ static NSURL* ParentForURL (NSURL* url) | ||
272 | 272 | col = row != -1 && col == -1 ? 0 : col; // Clicking a row which participates in multi-row selection causes clickedColumn to return -1 <rdar://10382268> |
273 | 273 | OFBPathInfoCell* cell = (OFBPathInfoCell*)[view.outlineView preparedCellAtColumn:col row:row]; |
274 | 274 | NSInteger hit = [cell hitTestForEvent:[NSApp currentEvent] inRect:[view.outlineView frameOfCellAtColumn:col row:row] ofView:view.outlineView]; |
275 | - if((hit & OakImageAndTextCellHitImage) && !([[NSApp currentEvent] modifierFlags] & NSCommandKeyMask)) | |
275 | + if(hit & OakImageAndTextCellHitImage) | |
276 | 276 | { |
277 | - [self didDoubleClickOutlineView:sender]; | |
277 | + if([[NSApp currentEvent] modifierFlags] & NSCommandKeyMask) | |
278 | + [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:@[ ((FSItem*)[view.outlineView itemAtRow:row]).url ]]; | |
279 | + else [self didDoubleClickOutlineView:sender]; | |
278 | 280 | } |
279 | 281 | else if(hit & OFBPathInfoCellHitCloseButton) |
280 | 282 | { |