Index: chrome/browser/app_controller_mac.mm |
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm |
index 4ad09d55711964434f4886c5bf2c34ed2bedbbbf..94412f2264b2a37814b4dcd52606ae9de4322237 100644 |
--- a/chrome/browser/app_controller_mac.mm |
+++ b/chrome/browser/app_controller_mac.mm |
@@ -359,24 +359,17 @@ void RecordLastRunAppBundlePath() { |
return nil; |
} |
-// If the window has tabs, make "close window" be cmd-shift-w, otherwise leave |
-// it as the normal cmd-w. Capitalization of the key equivalent affects whether |
-// the shift modifer is used. |
-- (void)adjustCloseWindowMenuItemKeyEquivalent:(BOOL)inHaveTabs { |
- [closeWindowMenuItem_ setKeyEquivalent:(inHaveTabs ? @"W" : @"w")]; |
+// Make "close window" be cmd-shift-w. Capitalization of the key equivalent |
+// affects whether the shift modifer is used. |
+- (void)adjustCloseWindowMenuItemKeyEquivalent { |
+ [closeWindowMenuItem_ setKeyEquivalent:@"W"]; |
Mark Mentovai
2011/06/06 16:27:15
Your change comment indicates that this is Command
shinyak (Google)
2011/06/07 03:15:57
This function is still used in fixCloseMenuItemKey
Mark Mentovai
2011/06/07 03:29:29
shinyak wrote:
shinyak (Google)
2011/06/07 03:43:04
Ah, OK. I understand your comment.
The menu items
|
[closeWindowMenuItem_ setKeyEquivalentModifierMask:NSCommandKeyMask]; |
} |
-// If the window has tabs, make "close tab" take over cmd-w, otherwise it |
-// shouldn't have any key-equivalent because it should be disabled. |
-- (void)adjustCloseTabMenuItemKeyEquivalent:(BOOL)hasTabs { |
- if (hasTabs) { |
- [closeTabMenuItem_ setKeyEquivalent:@"w"]; |
- [closeTabMenuItem_ setKeyEquivalentModifierMask:NSCommandKeyMask]; |
- } else { |
- [closeTabMenuItem_ setKeyEquivalent:@""]; |
- [closeTabMenuItem_ setKeyEquivalentModifierMask:0]; |
- } |
+// Make "close tab" be cmd-w. |
+- (void)adjustCloseTabMenuItemKeyEquivalent { |
+ [closeTabMenuItem_ setKeyEquivalent:@"w"]; |
+ [closeTabMenuItem_ setKeyEquivalentModifierMask:NSCommandKeyMask]; |
} |
// Explicitly remove any command-key equivalents from the close tab/window |
@@ -399,10 +392,9 @@ void RecordLastRunAppBundlePath() { |
// so just use our main browser window if there is one. |
tabController = [self mainWindowTabController]; |
} |
- BOOL windowWithMultipleTabs = |
- (tabController && [tabController numberOfTabs] > 1); |
- [self adjustCloseWindowMenuItemKeyEquivalent:windowWithMultipleTabs]; |
- [self adjustCloseTabMenuItemKeyEquivalent:windowWithMultipleTabs]; |
+ |
+ [self adjustCloseWindowMenuItemKeyEquivalent]; |
+ [self adjustCloseTabMenuItemKeyEquivalent]; |
} |
// Fix up the "close tab/close window" command-key equivalents. We do this |