diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2012-09-13 04:26:58 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2012-09-13 04:26:58 +0000 |
commit | 97b54c51a985afce00d04b166a3f242a66b89391 (patch) | |
tree | 13c5c3e9c90579972d4f047762033700638d3129 | |
parent | 31effc9720970e358b8eb67357c058973a6d601f (diff) |
Do not unregister apps if we can invalidate icons.
-rw-r--r-- | uicache.mm | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -125,14 +125,15 @@ int main(int argc, const char *argv[]) { [cache writeToFile:path atomically:YES]; if (workspace != nil) { - for (NSString *identifier in bundles) { - NSString *path([bundles objectForKey:identifier]); - [workspace unregisterApplication:[NSURL fileURLWithPath:path]]; - } - - for (NSString *identifier in bundles) - if ([workspace respondsToSelector:@selector(invalidateIconCache:)]) + if ([workspace respondsToSelector:@selector(invalidateIconCache:)]) { + for (NSString *identifier in bundles) [workspace invalidateIconCache:identifier]; + } else { + for (NSString *identifier in bundles) { + NSString *path([bundles objectForKey:identifier]); + [workspace unregisterApplication:[NSURL fileURLWithPath:path]]; + } + } for (NSString *identifier in bundles) { NSString *path([bundles objectForKey:identifier]); |