mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Use data source’s root item’s title in file browser header
This is instead of simply asking for the root URL’s display name, as the data source can provide a more specialized display name.
This commit is contained in:
@@ -189,6 +189,10 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
|
||||
for(NSURL* currentURL = _url; currentURL; currentURL = ParentForURL(currentURL))
|
||||
{
|
||||
NSMenuItem* menuItem = [menu addItemWithTitle:DisplayName(currentURL) action:@selector(takeURLFrom:) keyEquivalent:@""];
|
||||
|
||||
if(currentURL == _url && _outlineViewDelegate.dataSource)
|
||||
menuItem.title = _outlineViewDelegate.dataSource.rootItem.name;
|
||||
|
||||
[menuItem setTarget:self];
|
||||
[menuItem setRepresentedObject:currentURL];
|
||||
[menuItem setImage:IconImage(currentURL)];
|
||||
|
||||
Reference in New Issue
Block a user