mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Use NSHost to obtain computer’s name
This commit is contained in:
@@ -37,7 +37,7 @@ static NSString* DisplayName (NSURL* url, size_t numberOfParents = 0)
|
||||
{
|
||||
NSString* res = nil;
|
||||
if([[url scheme] isEqualToString:[kURLLocationComputer scheme]])
|
||||
res = CFBridgingRelease(SCDynamicStoreCopyComputerName(NULL, NULL));
|
||||
res = [[NSHost currentHost] localizedName];
|
||||
else if([[url scheme] isEqualToString:[kURLLocationBundles scheme]])
|
||||
res = @"Bundles";
|
||||
else // if([url isFileURL])
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
self.rootItem = [FSItem itemWithURL:anURL];
|
||||
self.rootItem.icon = [NSImage imageNamed:NSImageNameComputer]; // FIXME Assigning to property of type OakFileIconImage
|
||||
self.rootItem.name = CFBridgingRelease(SCDynamicStoreCopyComputerName(NULL, NULL));
|
||||
self.rootItem.name = [[NSHost currentHost] localizedName];
|
||||
self.rootItem.children = [self volumeList];
|
||||
}
|
||||
return self;
|
||||
|
||||
Reference in New Issue
Block a user