- if (group-- == 0)
- switch (row) {
- case 0:
- [cell setTitle:[package_ name]];
- [cell setValue:[package_ latest]];
- break;
-
- case 1:
- [cell addSubview:description_];
- break;
-
- case 2:
- if ([package_ website] != nil) {
- [cell setTitle:@"More Information"];
- [cell setShowDisclosure:YES];
- [cell setShowSelection:YES];
- break;
- }
- case 3:
- [cell setIcon:[UIImage applicationImageNamed:@"trusted.png"]];
- [cell setValue:@"This package has been signed."];
- break;
-
- default: _assert(false);
- }
- else if ([package_ installed] != nil && group-- == 0)
- switch (row) {
- case 0: {
- [cell setTitle:@"Version"];
- NSString *installed([package_ installed]);
- [cell setValue:(installed == nil ? @"n/a" : installed)];
- } break;
-
- case 1:
- [cell setTitle:@"File Content"];
- [cell setShowDisclosure:YES];
- [cell setShowSelection:YES];
- break;
-
- default: _assert(false);
- }
- else if (group-- == 0)
- switch (row) {
- case 0:
- [cell setTitle:@"Identifier"];
- [cell setValue:[package_ id]];
- break;
-
- case 1: {
- [cell setTitle:@"Section"];
- NSString *section([package_ section]);
- [cell setValue:(section == nil ? @"n/a" : section)];
- } break;
-
- case 2:
- [cell setTitle:@"Expanded Size"];
- [cell setValue:SizeString([package_ size])];
- break;
-
- case 3:
- [cell setTitle:@"Maintainer"];
- [cell setValue:[[package_ maintainer] name]];
- [cell setShowDisclosure:YES];
- [cell setShowSelection:YES];
- break;
-
- default: _assert(false);
- }
- else if ([package_ source] != nil && group-- == 0)
- switch (row) {
- case 0:
- [cell setTitle:[[package_ source] label]];
- [cell setValue:[[package_ source] version]];
- break;
-
- case 1:
- [cell setValue:[[package_ source] description]];
- break;
-
- case 2:
- [cell setTitle:@"Origin"];
- [cell setValue:[[package_ source] origin]];
- break;
-
- default: _assert(false);
- }
- else _assert(false);
+ if (group-- == 0) {
+ if (row-- == 0) {
+ [cell setTitle:[package_ name]];
+ [cell setValue:[package_ latest]];
+ } else if (row-- == 0) {
+ [cell addSubview:description_];
+ } else if ([package_ website] != nil && row-- == 0) {
+ [cell setTitle:@"More Information"];
+ [cell setShowDisclosure:YES];
+ [cell setShowSelection:YES];
+ } else if ([[package_ source] trusted] && row-- == 0) {
+ [cell setIcon:[UIImage applicationImageNamed:@"trusted.png"]];
+ [cell setValue:@"This package has been signed."];
+ } else _assert(false);
+ } else if ([package_ installed] != nil && group-- == 0) {
+ if (row-- == 0) {
+ [cell setTitle:@"Version"];
+ NSString *installed([package_ installed]);
+ [cell setValue:(installed == nil ? @"n/a" : installed)];
+ } else if (row-- == 0) {
+ [cell setTitle:@"Filesystem Content"];
+ [cell setShowDisclosure:YES];
+ [cell setShowSelection:YES];
+ } else _assert(false);
+ } else if (group-- == 0) {
+ if (row-- == 0) {
+ [cell setTitle:@"Identifier"];
+ [cell setValue:[package_ id]];
+ } else if (row-- == 0) {
+ [cell setTitle:@"Section"];
+ NSString *section([package_ section]);
+ [cell setValue:(section == nil ? @"n/a" : section)];
+ } else if (row-- == 0) {
+ [cell setTitle:@"Expanded Size"];
+ [cell setValue:SizeString([package_ size])];
+ } else if (row-- == 0) {
+ [cell setTitle:@"Maintainer"];
+ [cell setValue:[[package_ maintainer] name]];
+ [cell setShowDisclosure:YES];
+ [cell setShowSelection:YES];
+ } else if ([package_ relationships] != nil && row-- == 0) {
+ [cell setTitle:@"Package Relationships"];
+ [cell setShowDisclosure:YES];
+ [cell setShowSelection:YES];
+ } else _assert(false);
+ } else if ([package_ source] != nil && group-- == 0) {
+ if (row-- == 0) {
+ [cell setTitle:[[package_ source] label]];
+ [cell setValue:[[package_ source] version]];
+ } else if (row-- == 0) {
+ [cell setValue:[[package_ source] description]];
+ } else if (row-- == 0) {
+ [cell setTitle:@"Origin"];
+ [cell setValue:[[package_ source] origin]];
+ } else _assert(false);
+ } else _assert(false);