From 526ea480654d3ffbcc1bd9561a73dedcd13d8186 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 2 Nov 2010 05:59:38 -0700 Subject: [PATCH] Minor code cleanups to HomeController. --- MobileCydia.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index a9c4adaf..1a8f588b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -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; } -- 2.45.2