Add zoom menu item roles
This commit is contained in:
parent
59ffe35781
commit
bcc372568f
4 changed files with 47 additions and 31 deletions
|
@ -181,11 +181,11 @@ Role kRolesMap[] = {
|
|||
|
||||
// Set menu item's role.
|
||||
base::string16 role = model->GetRoleAt(index);
|
||||
if (role.empty()) {
|
||||
[item setTarget:self];
|
||||
} else {
|
||||
[item setTarget:self];
|
||||
if (!role.empty()) {
|
||||
for (const Role& pair : kRolesMap) {
|
||||
if (role == base::ASCIIToUTF16(pair.role)) {
|
||||
[item setTarget:nil];
|
||||
[item setAction:pair.selector];
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue