diff options
author | Grant Paul <chpwn@chpwn.com> | 2010-09-23 10:34:38 -0700 |
---|---|---|
committer | Jay Freeman <saurik@Jay-Freemans-MacBook-Pro.local> | 2010-10-04 00:12:20 -0700 |
commit | 40bfa2e6b725a6d987d105d04ffed737243399a4 (patch) | |
tree | 6a15455a1700c6a0037572f3a91e5a05a146a558 /Cydia.mm | |
parent | ce041f4fed04d60273ce36a1cff1235b106c5773 (diff) |
Update Cydia for BrowserController changes; also untested and uncompiled.
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -3899,7 +3899,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { @end /* }}} */ -@interface CYBrowserController : BrowserView { +@interface CYBrowserController : BrowserController { CydiaObject *cydia_; } @@ -4162,7 +4162,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } return self; } -- (void) didFinishLoading { +- (void) applyRightButton { UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithTitle:UCLocalize("CONFIRM") style:UIBarButtonItemStylePlain @@ -4170,8 +4170,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { action:@selector(confirmButtonClicked) ]; #if !AlwaysReload && !IgnoreInstall - if (issues_ == nil) [[self navigationItem] setRightBarButtonItem:rightItem]; - else [[self navigationItem] setRightBarButtonItem:nil]; + if (issues_ == nil && ![self isLoading]) [[self navigationItem] setRightBarButtonItem:rightItem]; + else [super applyRightButton]; +#else + [[self navigationItem] setRightBarButtonItem:nil]; #endif [rightItem release]; } @@ -5256,9 +5258,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) actionButtonClicked { - if (commercial_ && [self isLoading]) - [super _rightButtonClicked]; - else + // Never reload, that's bad. However, do nothing unless we are loaded. + // (Because free packages are never loading, their button will always work.) + if (![self isLoading]) [self _actionButtonClicked]; } #endif @@ -5328,7 +5330,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } } -- (void) didFinishLoading { +- (void) applyRightButton { int count = [buttons_ count]; UIBarButtonItem *actionItem = [[UIBarButtonItem alloc] initWithTitle:count == 0 ? nil : count != 1 ? UCLocalize("MODIFY") : [buttons_ objectAtIndex:0] @@ -5336,7 +5338,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { target:self action:@selector(actionButtonClicked) ]; - [[self navigationItem] setRightBarButtonItem:actionItem]; + if (![self isLoading]) [[self navigationItem] setRightBarButtonItem:actionItem]; + else [super applyRightButton]; [actionItem release]; } |