X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/7ec29c77d735508fb93ef9b16a10268f1e013345..81bf90f6b33e7d58719923c8e1260bd2b4ff9907:/Cydia.mm diff --git a/Cydia.mm b/Cydia.mm index d07e85f4..a4b2e600 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -257,7 +257,7 @@ extern NSString * const kCAFilterNearest; #define lprintf(args...) fprintf(stderr, args) -#define ForRelease 0 +#define ForRelease 1 #define ForSaurik (1 && !ForRelease) #define IgnoreInstall (0 && !ForRelease) #define RecycleWebViews 0 @@ -638,7 +638,6 @@ bool reload_; static NSDictionary *SectionMap_; static NSMutableDictionary *Metadata_; -static NSMutableDictionary *Indices_; static _transient NSMutableDictionary *Settings_; static _transient NSString *Role_; static _transient NSMutableDictionary *Packages_; @@ -1244,7 +1243,6 @@ class Progress : - (Source *) source; - (NSString *) role; -- (NSString *) rating; - (BOOL) matches:(NSString *)text; @@ -1307,7 +1305,7 @@ class Progress : } + (NSArray *) _attributeKeys { - return [NSArray arrayWithObjects:@"applications", @"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"purposes", @"rating", @"section", @"size", @"source", @"sponsor", @"tagline", @"warnings", nil]; + return [NSArray arrayWithObjects:@"applications", @"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"purposes", @"section", @"size", @"source", @"sponsor", @"tagline", @"warnings", nil]; } - (NSArray *) attributeKeys { @@ -1838,13 +1836,6 @@ class Progress : return role_; } -- (NSString *) rating { - if (NSString *rating = [Indices_ objectForKey:@"Rating"]) - return [rating stringByReplacingOccurrencesOfString:@"@P" withString:[id_ stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; - else - return nil; -} - - (BOOL) matches:(NSString *)text { if (text == nil) return NO; @@ -4095,9 +4086,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { return; Package *package = [packages_ objectAtIndex:row]; + package = [database_ packageWithName:[package id]]; PackageView *view = [[[PackageView alloc] initWithBook:book_ database:database_] autorelease]; - [view setDelegate:delegate_]; [view setPackage:package]; + [view setDelegate:delegate_]; [book_ pushPage:view]; } @@ -7059,14 +7051,6 @@ int main(int argc, char *argv[]) { _pooled /*AddPreferences(@"/Applications/Preferences.app/Settings-iPhone.plist"); AddPreferences(@"/Applications/Preferences.app/Settings-iPod.plist");*/ - /*if ((Indices_ = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/lib/cydia/indices.plist"]) == NULL) - Indices_ = [[NSMutableDictionary alloc] init];*/ - - Indices_ = [NSMutableDictionary dictionaryWithObjectsAndKeys: - @"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/rating/@", @"Rating", - //@"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/repotag/@", @"RepoTag", - nil]; - _trace(); Metadata_ = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/lib/cydia/metadata.plist"]; _trace();