diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-03 13:09:55 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:35 -0800 |
commit | e6124cb6861825f588b0cf7be198ea35b5b730ba (patch) | |
tree | 9441a0174cecbb1681052b1a59ad70ef7fd7ac90 /MobileCydia.mm | |
parent | 6ffdaae37da1b4c63d067805fc279ef5cbe847e5 (diff) |
Provide -[CyteWebViewController leftButton] API.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 0faac89..9eb5791 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4857,16 +4857,18 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { nil]; [self setURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/#!/confirm/", UI_]]]; - - [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] - initWithTitle:UCLocalize("CANCEL") - style:UIBarButtonItemStylePlain - target:self - action:@selector(cancelButtonClicked) - ] autorelease]]; } return self; } +- (UIBarButtonItem *) leftButton { + return [[[UIBarButtonItem alloc] + initWithTitle:UCLocalize("CANCEL") + style:UIBarButtonItemStylePlain + target:self + action:@selector(cancelButtonClicked) + ] autorelease]; +} + #if !AlwaysReload - (void) applyRightButton { if ([issues_ count] == 0 && ![self isLoading]) @@ -6431,15 +6433,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [alert show]; } -- (void) viewDidLoad { - [super viewDidLoad]; - - [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] +- (UIBarButtonItem *) leftButton { + return [[[UIBarButtonItem alloc] initWithTitle:UCLocalize("ABOUT") style:UIBarButtonItemStylePlain target:self action:@selector(aboutButtonClicked) - ] autorelease]]; + ] autorelease]; } - (void) unloadData { @@ -6469,15 +6469,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { return [NSURL URLWithString:@"cydia://manage"]; } -- (void) viewDidLoad { - [super viewDidLoad]; - - [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] +- (UIBarButtonItem *) leftButton { + return [[[UIBarButtonItem alloc] initWithTitle:UCLocalize("SETTINGS") style:UIBarButtonItemStylePlain target:self action:@selector(settingsButtonClicked) - ] autorelease]]; + ] autorelease]; } - (void) settingsButtonClicked { |