diff options
Diffstat (limited to 'views/controls/menu')
-rw-r--r-- | views/controls/menu/native_menu_win.cc | 3 | ||||
-rw-r--r-- | views/controls/menu/native_menu_x.cc | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/views/controls/menu/native_menu_win.cc b/views/controls/menu/native_menu_win.cc index 9993d4e..3c31639 100644 --- a/views/controls/menu/native_menu_win.cc +++ b/views/controls/menu/native_menu_win.cc @@ -372,7 +372,8 @@ void NativeMenuWin::UpdateStates() { int menu_index = model_index + first_item_index_; SetMenuItemState(menu_index, model_->IsEnabledAt(model_index), model_->IsItemCheckedAt(model_index), false); - if (model_->IsLabelDynamicAt(model_index)) { + if (model_->IsItemDynamicAt(model_index)) { + // TODO(atwilson): Update the icon as well (http://crbug.com/66508). SetMenuItemLabel(menu_index, model_index, model_->GetLabelAt(model_index)); } diff --git a/views/controls/menu/native_menu_x.cc b/views/controls/menu/native_menu_x.cc index db47f7e..45f9446 100644 --- a/views/controls/menu/native_menu_x.cc +++ b/views/controls/menu/native_menu_x.cc @@ -136,12 +136,14 @@ void NativeMenuX::UpdateMenuFromModel(SubmenuView* menu, MenuItemView* mitem = menu->GetMenuItemAt(index - sep); mitem->SetVisible(model->IsVisibleAt(index)); mitem->SetEnabled(model->IsEnabledAt(index)); - if (model->IsLabelDynamicAt(index)) { + if (model->IsItemDynamicAt(index)) { mitem->SetTitle(UTF16ToWide(model->GetLabelAt(index))); } SkBitmap icon; if (model->GetIconAt(index, &icon)) { + // TODO(atwilson): Support removing the icon dynamically + // (http://crbug.com/66508). mitem->SetIcon(icon); } |