if (!err && !out_application_name) { err = check_error (KIM_NULL_PARAMETER_ERR); }
if (!err && bundle) {
- CFURLRef bundle_url = CFBundleCopyBundleURL (bundle);
+ cfname = CFBundleGetValueForInfoDictionaryKey (bundle,
+ kCFBundleNameKey);
- if (bundle_url) {
- err = LSCopyDisplayNameForURL (bundle_url, &cfname);
- check_error (err);
+ if (!cfname || CFGetTypeID (cfname) != CFStringGetTypeID ()) {
+ cfname = CFBundleGetValueForInfoDictionaryKey (bundle,
+ kCFBundleExecutableKey);
}
- if (bundle_url) { CFRelease (bundle_url); }
+ if (cfname) {
+ cfname = CFStringCreateCopy (kCFAllocatorDefault, cfname);
+ }
}
if (!err && !cfname) {