]> git.saurik.com Git - winterboard.git/blobdiff - Library.mm
Commit most of the new layout I'd been working on.
[winterboard.git] / Library.mm
index 975bd1d5a8aeb5b430ad88afbf8da41ca263fffb..bc8084b84066d80b43751f05097d36b7a44aa3d5 100644 (file)
@@ -433,7 +433,12 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") {
     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);
@@ -450,7 +455,7 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") {
         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);
@@ -2430,7 +2435,7 @@ static void SBInitialize() {
     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);
@@ -2458,7 +2463,9 @@ MSInitialize {
 
     // 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;