]> git.saurik.com Git - winterboard.git/blobdiff - Settings.mm
I hate WinterBoard; aka: Welcome to LaunchServices.
[winterboard.git] / Settings.mm
index 6c4cd0142b9434275b7f4314227b75a91ce45dd9..f88f8b1c5cd9427d83f8abd735768658a311f4b8 100644 (file)
@@ -441,8 +441,9 @@ static NSString *_plist;
 
     system("rm -rf /User/Library/Caches/SpringBoardIconCache");
     system("rm -rf /User/Library/Caches/SpringBoardIconCache-small");
+    system("rm -rf /User/Library/Caches/com.apple.IconsCache");
 
-    system("killall SpringBoard");
+    system("killall lsd SpringBoard");
 }
 
 - (void) cancelChanges {
@@ -454,8 +455,8 @@ static NSString *_plist;
     [_settings setObject:[NSNumber numberWithBool:IsIconHiddenDisplayId(WinterBoardDisplayID)] forKey:@"IconHidden"];
     [self reloadSpecifiers];
     if (![[PSViewController class] instancesRespondToSelector:@selector(showLeftButton:withStyle:rightButton:withStyle:)]) {
-        self.navigationItem.leftBarButtonItem = nil;
-        self.navigationItem.rightBarButtonItem = nil;
+        [[self navigationItem] setLeftBarButtonItem:nil];
+        [[self navigationItem] setRightBarButtonItem:nil];
     } else {
         [self showLeftButton:nil withStyle:0 rightButton:nil withStyle:0];
     }
@@ -490,7 +491,8 @@ static NSString *_plist;
 - (void) viewWillAppear:(BOOL)animated {
     if (settingsChanged)
         [self settingsChanged];
-    [super viewWillAppear:animated];
+    if ([super respondsToSelector:@selector(viewWillAppear:)])
+        [super viewWillAppear:animated];
 }
 
 - (void) pushController:(id)controller {
@@ -510,8 +512,8 @@ static NSString *_plist;
         UIBarButtonItem *cancelButton([[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(settingsConfirmButtonClicked:)]);
         cancelButton.tag = 0;
         respringButton.tag = 1;
-        self.navigationItem.leftBarButtonItem = respringButton;
-        self.navigationItem.rightBarButtonItem = cancelButton;
+        [[self navigationItem] setLeftBarButtonItem:respringButton];
+        [[self navigationItem] setRightBarButtonItem:cancelButton];
         [respringButton release];
         [cancelButton release];
     } else {