]> git.saurik.com Git - winterboard.git/blobdiff - Settings.mm
I fucking hate SummerBoard.
[winterboard.git] / Settings.mm
index edc0d3f5bc8db0ed13a393780b10abb93b9042e4..3a5d6b67ffd1bb55a1549aae90e9922ef1f00ac3 100644 (file)
@@ -454,8 +454,10 @@ 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];
     }
     settingsChanged = NO;
 }
@@ -466,8 +468,10 @@ static NSString *_plist;
         return;
     }
 
-    if (buttonIndex == 0)
+    if (buttonIndex == 0) {
         [self cancelChanges];
+        return;
+    }
 
     [self suspend];
     [self.rootController popController];
@@ -486,7 +490,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 {
@@ -506,8 +511,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 {