diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 14:34:50 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 14:34:50 +0000 |
commit | cbb6fe5d50a93dd4638e6ffaf1dc0f98360187c1 (patch) | |
tree | 912ab4fc48d00ab5bebd59fcfa28cdc4ee15bdd5 /chrome/browser/tab_contents | |
parent | 2ee0f771188145a6b81fc1135bf11284ea771fa4 (diff) | |
download | chromium_src-cbb6fe5d50a93dd4638e6ffaf1dc0f98360187c1.zip chromium_src-cbb6fe5d50a93dd4638e6ffaf1dc0f98360187c1.tar.gz chromium_src-cbb6fe5d50a93dd4638e6ffaf1dc0f98360187c1.tar.bz2 |
Support disabling items in submenus of a context menu.
Without this change, items in submenus of a context menu where always enabled. With this change, the value we use for [NSMenuItem setEnabled:] is respected.
This change is required for an upcoming change that needs this to work.
BUG=none
TEST=Right-click on a text input field, Spell Checker Options->Show spelling panel shouldn't be disabled.
Review URL: http://codereview.chromium.org/567031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 1 | ||||
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu_mac.mm | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index aa25c83..039b245 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -504,6 +504,7 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const { case IDC_SPELLCHECK_SUGGESTION_3: case IDC_SPELLCHECK_SUGGESTION_4: case IDC_SPELLCHECK_MENU: + case IDC_SPELLPANEL_TOGGLE: case IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS: case IDS_CONTENT_CONTEXT_VIEWFRAMEINFO: return true; diff --git a/chrome/browser/tab_contents/render_view_context_menu_mac.mm b/chrome/browser/tab_contents/render_view_context_menu_mac.mm index 8e7c01e..25cea42 100644 --- a/chrome/browser/tab_contents/render_view_context_menu_mac.mm +++ b/chrome/browser/tab_contents/render_view_context_menu_mac.mm @@ -140,6 +140,7 @@ void RenderViewContextMenuMac::StartSubMenu(int command_id, action:nil keyEquivalent:@""]); insert_menu_ = [[[NSMenu alloc] init] autorelease]; + [insert_menu_ setAutoenablesItems:NO]; [submenu_item setSubmenu:insert_menu_]; [menu_ addItem:submenu_item]; } |