]> git.saurik.com Git - cydia.git/commitdiff
Minor code cleanups to HomeController.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 2 Nov 2010 12:59:38 +0000 (05:59 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 4 Nov 2010 12:30:54 +0000 (05:30 -0700)
MobileCydia.mm

index a9c4adaf30db0fee4d67f3a0dba0d1103ded1581..1a8f588b4c5217251118f1c3ba74e6956b01e0c9 100644 (file)
@@ -6321,6 +6321,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 
 - (void) _setMoreHeaders:(NSMutableURLRequest *)request {
     [super _setMoreHeaders:request];
+
     if (ChipID_ != nil)
         [request setValue:ChipID_ forHTTPHeaderField:@"X-Chip-ID"];
     if (UniqueID_ != nil)
@@ -6328,7 +6329,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) aboutButtonClicked {
-    UIAlertView *alert = [[[UIAlertView alloc] init] autorelease];
+    UIAlertView *alert([[[UIAlertView alloc] init] autorelease]);
+
     [alert setTitle:UCLocalize("ABOUT_CYDIA")];
     [alert addButtonWithTitle:UCLocalize("CLOSE")];
     [alert setCancelButtonIndex:0];
@@ -6355,14 +6357,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 
 - (id) init {
     if ((self = [super init]) != nil) {
-        UIBarButtonItem *aboutItem = [[UIBarButtonItem alloc]
+        [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
             initWithTitle:UCLocalize("ABOUT")
             style:UIBarButtonItemStylePlain
             target:self
             action:@selector(aboutButtonClicked)
-        ];
-        [[self navigationItem] setLeftBarButtonItem:aboutItem];
-        [aboutItem release];
+        ] autorelease]];
     } return self;
 }