diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-26 14:18:35 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-26 14:18:35 -0800 |
commit | 45211c6724e888d9baa3cc8217f46d42e5c2fa13 (patch) | |
tree | 9f032c67bb2d102e54be9bfcaacd0c16b77442e5 /MobileCydia.mm | |
parent | 1869a99c20d97931010559d20aedaef0e3225b24 (diff) | |
parent | 46594c7eb0721b7cf397372e4917ff5e392decc9 (diff) |
Merge branch 'master' of git.saurik.com:cydia
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index dae7d61..ee5e006 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1735,6 +1735,7 @@ typedef std::map< unsigned long, _H<Source> > SourceMap; _transient NSDate *firstSeen_; _transient NSDate *lastSeen_; bool subscribed_; + bool ignored_; } - (Package *) initWithVersion:(pkgCache::VerIterator)version withZone:(NSZone *)zone inPool:(apr_pool_t *)pool database:(Database *)database; @@ -2178,6 +2179,8 @@ struct PackageNameOrdering : obsolete_ = [self hasTag:@"cydia::obsolete"]; essential_ = ((iterator_->Flags & pkgCache::Flag::Essential) == 0 ? NO : YES) || [self hasTag:@"cydia::essential"]; _end + + ignored_ = iterator_->SelectedState == pkgCache::State::Hold; _end } return self; } @@ -2315,11 +2318,7 @@ struct PackageNameOrdering : } - (BOOL) ignored { - NSDictionary *metadata([self metadata]); - if (NSNumber *ignored = [metadata objectForKey:@"IsIgnored"]) - return [ignored boolValue]; - else - return false; + return ignored_; } - (NSString *) latest { @@ -7020,7 +7019,7 @@ freeing the view controllers on tab change */ #endif Section *upgradable = [[[Section alloc] initWithName:UCLocalize("AVAILABLE_UPGRADES") localize:NO] autorelease]; - Section *ignored = [[[Section alloc] initWithName:UCLocalize("IGNORED_UPGRADES") localize:NO] autorelease]; + Section *ignored = nil; Section *section = nil; NSDate *last = nil; @@ -7061,9 +7060,12 @@ freeing the view controllers on tab change */ } [section addToCount]; - } else if ([package ignored]) + } else if ([package ignored]) { + if (ignored == nil) { + ignored = [[[Section alloc] initWithName:UCLocalize("IGNORED_UPGRADES") row:offset localize:NO] autorelease]; + } [ignored addToCount]; - else { + } else { ++upgrades_; [upgradable addToCount]; } @@ -7249,7 +7251,7 @@ freeing the view controllers on tab change */ } - (void) onIgnored:(id)control { - [self onSomething:(int) [control isOn] withKey:@"IsIgnored"]; + // TODO: set Held state - possibly call out to dpkg, etc. } - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |