Radio menu items should have at least one item checked.
This is to force all platforms to match the same behavior in GTK+.
This commit is contained in:
parent
3921895dd5
commit
6a48568911
5 changed files with 28 additions and 5 deletions
|
@ -135,6 +135,12 @@ void Menu::ExecuteCommand(int command_id, int event_flags) {
|
|||
command_id);
|
||||
}
|
||||
|
||||
void Menu::MenuWillShow(ui::SimpleMenuModel* source) {
|
||||
v8::Locker locker(node_isolate);
|
||||
v8::HandleScope handle_scope(node_isolate);
|
||||
CallDelegate(v8::False(), GetWrapper(node_isolate), "menuWillShow", -1);
|
||||
}
|
||||
|
||||
void Menu::InsertItemAt(
|
||||
int index, int command_id, const base::string16& label) {
|
||||
model_->InsertItemAt(index, command_id, label);
|
||||
|
@ -226,7 +232,7 @@ void Menu::BuildPrototype(v8::Isolate* isolate,
|
|||
#if defined(OS_WIN) || defined(TOOLKIT_GTK)
|
||||
.SetMethod("attachToWindow", &Menu::AttachToWindow)
|
||||
#endif
|
||||
.SetMethod("popup", &Menu::Popup);
|
||||
.SetMethod("_popup", &Menu::Popup);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue