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

Unified Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 345050: Mac: fix Text Encoding menu/submenu (Closed)
Patch Set: Created 11 years, 1 month 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 | « chrome/app/nibs/MainMenu.xib ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 3c8df3b1e7c822462157d18e83c01e3ff3a05f06..42d35dd65aeef5025134fb3c409ac7817d2f3fcf 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -579,6 +579,15 @@ willPositionSheet:(NSWindow*)sheet
case IDC_FULLSCREEN:
enable &= [self supportsFullscreen];
break;
+ default:
+ // Special handling for the contents of the Text Encoding submenu. On
+ // Mac OS, instead of enabling/disabling the top-level menu item, we
+ // enable/disable the submenu's contents (per Apple's HIG).
+ EncodingMenuController encoding_controller;
TVL 2009/11/03 18:26:28 how expensive is constructing one of these, should
+ if (encoding_controller.DoesCommandBelongToEncodingMenu(tag)) {
+ enable &= browser_->command_updater()->IsCommandEnabled(
+ IDC_ENCODING_MENU) ? YES : NO;
+ }
}
// If the item is toggleable, find its toggle state and
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698