Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm

Issue 130673002: Explicitly use Cmd+w for "Close Window" in apps. (Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
diff --git a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
index 38004c5fa33de775a6332b374d5342bc453903c6..d94bf013b99aea462d7272960614b332fdf5f238 100644
--- a/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
+++ b/chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm
@@ -237,6 +237,10 @@ void AddDuplicateItem(NSMenuItem* top_level_item,
[[fileMenuItem_ submenu] addItem:[openDoppelganger_ menuItem]];
[[fileMenuItem_ submenu] addItem:[NSMenuItem separatorItem]];
AddDuplicateItem(fileMenuItem_, IDC_FILE_MENU, IDC_CLOSE_WINDOW);
+ // Set the expected key equivalent explicitly here because Chrome's key
+ // equivalent is sometimes "W" (Cmd+Shift+W), and "Close Tab" is mapped to
+ // Cmd+W.
+ [[[fileMenuItem_ submenu] itemWithTag:IDC_CLOSE_WINDOW] setKeyEquivalent:@"w"];
tapted 2014/01/09 04:35:05 Do you need to hook this up in something like [Dop
jackhou1 2014/01/09 06:18:57 I don't think so. "Close Window" will be Cmd+w whe
// Edit menu. This copies the menu entirely and removes
// "Paste and Match Style" and "Find". This is because the last two items,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698