[Mac] Move the FixMenuTitles hack to MenuController.
This commit is contained in:
parent
22012d41d8
commit
f908619630
3 changed files with 5 additions and 22 deletions
|
@ -159,7 +159,12 @@ int EventFlagsFromNSEvent(NSEvent* event) {
|
|||
ui::MenuModel* submenuModel = model->GetSubmenuModelAt(index);
|
||||
NSMenu* submenu =
|
||||
[self menuFromModel:(ui::SimpleMenuModel*)submenuModel];
|
||||
[submenu setTitle:[item title]];
|
||||
[item setSubmenu:submenu];
|
||||
|
||||
// Hack to set window menu.
|
||||
if ([[item title] isEqualToString:@"Window"] && [submenu numberOfItems] > 0)
|
||||
[NSApp setWindowsMenu:submenu];
|
||||
} else {
|
||||
// The MenuModel works on indexes so we can't just set the command id as the
|
||||
// tag like we do in other menus. Also set the represented object to be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue