mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Show key equivalents in file browser action menu
Also change New Document → New File. Such title makes more sense when shown in the main menu.
This commit is contained in:
@@ -839,8 +839,8 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
|
||||
if(rootPath)
|
||||
{
|
||||
[aMenu addItem:[NSMenuItem separatorItem]];
|
||||
[aMenu addItemWithTitle:@"New Document" action:@selector(newDocumentInDirectory:) keyEquivalent:@""];
|
||||
[aMenu addItemWithTitle:@"New Folder" action:@selector(newFolder:) keyEquivalent:@""];
|
||||
[[aMenu addItemWithTitle:@"New File" action:@selector(newDocumentInDirectory:) keyEquivalent:@"n"] setKeyEquivalentModifierMask:NSCommandKeyMask|NSShiftKeyMask];
|
||||
[[aMenu addItemWithTitle:@"New Folder" action:@selector(newFolder:) keyEquivalent:@"n"] setKeyEquivalentModifierMask:NSCommandKeyMask|NSControlKeyMask];
|
||||
}
|
||||
|
||||
if(rootPath || hasFileSelected)
|
||||
@@ -929,6 +929,11 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
|
||||
return menu;
|
||||
}
|
||||
|
||||
- (BOOL)menuHasKeyEquivalent:(NSMenu*)aMenu forEvent:(NSEvent*)anEvent target:(id*)anId action:(SEL*)aSEL
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)menuNeedsUpdate:(NSMenu*)aMenu
|
||||
{
|
||||
[aMenu removeAllItems];
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
{ utf8::to_s(NSEnterCharacter), @selector(performEditSelectedRow:) },
|
||||
{ "@" + utf8::to_s(NSDownArrowFunctionKey), @selector(performDoubleClick:) },
|
||||
{ "@o", @selector(performDoubleClick:) },
|
||||
{ "@N", @selector(newFolder:) },
|
||||
{ "@d", @selector(duplicateSelectedEntries:) },
|
||||
{ "@G", @selector(orderFrontGoToFolder:) },
|
||||
{ " ", @selector(toggleQuickLookPreview:) },
|
||||
|
||||
Reference in New Issue
Block a user