From 017b54a23d9e45398d90c494cfa35588702898d8 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Fri, 18 Feb 2011 01:18:37 -0800 Subject: [PATCH] Use -[Source key] instead of -[Source name] or -[Source uri]. --- MobileCydia.mm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 728b5504..4d9fe2e5 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7644,7 +7644,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { /* Source Controller {{{ */ @interface SourceController : FilteredPackageListController { _transient Source *source_; - NSString *uri_; + NSString *key_; } - (id) initWithDatabase:(Database *)database source:(Source *)source; @@ -7659,7 +7659,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) initWithDatabase:(Database *)database source:(Source *)source { source_ = source; - uri_ = [source uri]; + key_ = [[source key] retain]; if ((self = [super initWithDatabase:database title:[source label] filter:@selector(isVisibleInSource:) with:source]) != nil) { } return self; @@ -7668,9 +7668,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) reloadData { NSArray *sources = [database_ sources]; for (Source *source in sources) { - if ([[source uri] isEqual:uri_]) { + if ([[source key] isEqual:key_]) { source_ = source; - uri_ = [source uri]; + [key_ release]; + key_ = [[source key] retain]; break; } } @@ -9008,7 +9009,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } else { NSArray *sources = [database_ sources]; for (Source *source in sources) { - if ([[source name] caseInsensitiveCompare:argument] == NSOrderedSame) { + if ([[source key] isEqual:argument]) { controller = [[[SourceController alloc] initWithDatabase:database_ source:source] autorelease]; break; } -- 2.45.2