mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-14 14:41:28 +00:00
New: better logging of image bundle info in nib2cib.
If an image comes from a framework, the framework's bundle identifier is logged if it is available.
This commit is contained in:
@@ -42,7 +42,8 @@ var FILE = require("file"),
|
||||
_resourceName = [aCoder decodeObjectForKey:@"NSResourceName"];
|
||||
|
||||
var size = CGSizeMakeZero(),
|
||||
framework = @"";
|
||||
framework = @"",
|
||||
bundleIdentifier = @"";
|
||||
|
||||
if (_resourceName == "NSSwitch")
|
||||
return nil;
|
||||
@@ -53,9 +54,7 @@ var FILE = require("file"),
|
||||
}
|
||||
else
|
||||
{
|
||||
var match = /^(.+)@(.+)$/.exec(_resourceName),
|
||||
framework = @"",
|
||||
bundleIdentifier = @"";
|
||||
var match = /^(.+)@(.+)$/.exec(_resourceName);
|
||||
|
||||
if (match)
|
||||
{
|
||||
@@ -80,8 +79,6 @@ var FILE = require("file"),
|
||||
{
|
||||
_resourceName += FILE.extension(resourceInfo.path);
|
||||
}
|
||||
|
||||
CPLog.debug(" Resource: %s\n Framework: %s\n Path: %s\n Size: %d x %d", _resourceName, framework, resourceInfo ? FILE.canonical(resourceInfo.path) : "", size.width, size.height);
|
||||
}
|
||||
|
||||
if (resourceInfo && resourceInfo.path && resourceInfo.framework)
|
||||
@@ -94,7 +91,16 @@ var FILE = require("file"),
|
||||
}
|
||||
|
||||
_properties = @{ @"size":size, @"bundleIdentifier":bundleIdentifier, @"framework":framework };
|
||||
}
|
||||
|
||||
CPLog.debug(" Resource: %s\n Framework: %s%s\n Path: %s\n Size: %d x %d",
|
||||
_resourceName,
|
||||
framework ? framework : "<none>",
|
||||
bundleIdentifier ? " (" + bundleIdentifier + ")" :
|
||||
framework ? " (<no bundle identifier>)" : "",
|
||||
resourceInfo ? FILE.canonical(resourceInfo.path) : "",
|
||||
size.width,
|
||||
size.height);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user