diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-27 15:05:50 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-27 15:05:50 +0000 |
commit | 03149bdbf5917e1e1f4f4fd2232e454994572928 (patch) | |
tree | 340c3adba7042723e1ff50b2fbb10663631a70b3 /chrome/browser/cocoa/download_item_controller.mm | |
parent | b5442cec207913616828e46f490c9242df8ffb86 (diff) | |
download | chromium_src-03149bdbf5917e1e1f4f4fd2232e454994572928.zip chromium_src-03149bdbf5917e1e1f4f4fd2232e454994572928.tar.gz chromium_src-03149bdbf5917e1e1f4f4fd2232e454994572928.tar.bz2 |
Mac: Cmd-clicking a download button shows the download instead of opening it.
BUG=55052
TEST=Download something. Cmd-click the download in the shelf, should show it in finder. Click the item in the shelf, it should open.
Review URL: http://codereview.chromium.org/3387019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/download_item_controller.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm index e13fc74..eaf966c 100644 --- a/chrome/browser/cocoa/download_item_controller.mm +++ b/chrome/browser/cocoa/download_item_controller.mm @@ -244,8 +244,14 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { } - (IBAction)handleButtonClick:(id)sender { - DownloadItem* download = bridge_->download_model()->download(); - download->OpenDownload(); + NSEvent* event = [NSApp currentEvent]; + if ([event modifierFlags] & NSCommandKeyMask) { + // Let cmd-click show the file in Finder, like e.g. in Safari and Spotlight. + menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::SHOW_IN_FOLDER); + } else { + DownloadItem* download = bridge_->download_model()->download(); + download->OpenDownload(); + } } - (NSSize)preferredSize { |