NSString *path = [self path];
NSString *folder = [path lastPathComponent];
NSString *dname = [self displayName];
- NSString *didentifier = [self displayIdentifier];
+
+ NSString *didentifier;
+ if ([self respondsToSelector:@selector(displayIdentifier)])
+ didentifier = [self displayIdentifier];
+ else
+ didentifier = nil;
if (Debug_)
NSLog(@"WB:Debug: [SBApplication(%@:%@:%@:%@) pathForIcon]", identifier, folder, dname, didentifier);
if (NSString *name = Name) \
[names addObject:[NSString stringWithFormat:@"Icons%@/%@.png", suffix, name]];
- if (![didentifier isEqualToString:identifier])
+ if (didentifier != nil && ![didentifier isEqualToString:identifier])
testForIcon(didentifier);
testForIcon(identifier);
if (paper != nil)
paper = [paper stringByDeletingLastPathComponent];
- {
- size_t size;
- sysctlbyname("hw.machine", NULL, &size, NULL, 0);
- char *machine = new char[size];
-
- if (sysctlbyname("hw.machine", machine, &size, NULL, 0) == -1) {
- perror("sysctlbyname(\"hw.machine\", ?)");
- delete [] machine;
- machine = NULL;
- }
-
- IsWild_ = machine != NULL && strncmp(machine, "iPad", 4) == 0;
- }
-
if (Debug_)
NSLog(@"WB:Debug:Info = %@", [Info_ description]);
no = true;
if (strstr(path, "/icon") != NULL)
- MSHookProcess(-1, "");
+ *reinterpret_cast<void *volatile *>(NULL) = NULL;
if (fd == -1 && errno == EFAULT)
NSLog(@"open(%p, %#x, %#o) = %d\n", path, oflag, mode, fd);
dlset(_GSFontGetUseLegacyFontMetrics, "GSFontGetUseLegacyFontMetrics");
+ // Initialize IsWild_ {{{
+ size_t size;
+ sysctlbyname("hw.machine", NULL, &size, NULL, 0);
+ char *machine = new char[size];
+
+ if (sysctlbyname("hw.machine", machine, &size, NULL, 0) == -1) {
+ perror("sysctlbyname(\"hw.machine\", ?)");
+ delete [] machine;
+ machine = NULL;
+ }
+
+ IsWild_ = machine != NULL && strncmp(machine, "iPad", 4) == 0;
+ // }}}
// Load Settings.plist {{{
if (NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/User/Library/Preferences/com.saurik.WinterBoard.plist"]]) {
- if (NSNumber *value = [settings objectForKey:@"SummerBoard"])
+ if (kCFCoreFoundationVersionNumber >= 1000)
+ SummerBoard_ = false;
+ else if (NSNumber *value = [settings objectForKey:@"SummerBoard"])
SummerBoard_ = [value boolValue];
else
SummerBoard_ = true;