Use helper for bundle item’s key equivalent

This is to allow a bundle item to display another key than the one assigned to the item, e.g. when the bundle item is matched by a proxy item it should show that item’s key equivalent.
This commit is contained in:
Allan Odgaard
2012-09-06 20:54:10 +02:00
parent 4772938deb
commit 73d586c2ba
6 changed files with 11 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ OAK_DEBUG_VAR(BundleMenu);
default:
{
NSMenuItem* menuItem = [aMenu addItemWithTitle:[NSString stringWithCxxString:name_with_selection(*item, hasSelection)] action:@selector(doBundleItem:) keyEquivalent:@""];
[menuItem setKeyEquivalentCxxString:(*item)->value_for_field(bundles::kFieldKeyEquivalent)];
[menuItem setKeyEquivalentCxxString:key_equivalent(*item)];
[menuItem setTabTriggerCxxString:(*item)->value_for_field(bundles::kFieldTabTrigger)];
[menuItem setRepresentedObject:[NSString stringWithCxxString:(*item)->uuid()]];
}