]> git.saurik.com Git - cydia.git/commitdiff
Factor source addition out to -[Cydia addTrivialSource:].
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 19 Feb 2011 13:20:22 +0000 (05:20 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 19 Feb 2011 13:20:22 +0000 (05:20 -0800)
MobileCydia.mm

index 16367e4ac62bb418bfc710159c9496f8bec4485a..ddd82f548973c113fea53f7f9e074cf8dda28779 100644 (file)
@@ -1151,6 +1151,7 @@ bool isSectionVisible(NSString *section) {
 - (void) loadData;
 - (void) updateData;
 - (void) syncData;
+- (void) addTrivialSource:(NSString *)href;
 - (void) showSettings;
 - (UIProgressHUD *) addProgressHUD;
 - (void) removeProgressHUD:(UIProgressHUD *)hud;
@@ -8074,12 +8075,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) complete {
-    [Sources_ setObject:[NSDictionary dictionaryWithObjectsAndKeys:
-        @"deb", @"Type",
-        href_, @"URI",
-        @"./", @"Distribution",
-    nil] forKey:[NSString stringWithFormat:@"deb:%@:./", href_]];
-
+    [delegate_ addTrivialSource:href_];
     [delegate_ syncData];
 }
 
@@ -8933,6 +8929,14 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     ];
 }
 
+- (void) addTrivialSource:(NSString *)href {
+    [Sources_ setObject:[NSDictionary dictionaryWithObjectsAndKeys:
+        @"deb", @"Type",
+        href, @"URI",
+        @"./", @"Distribution",
+    nil] forKey:[NSString stringWithFormat:@"deb:%@:./", href]];
+}
+
 - (void) reloadDataWithInvocation:(NSInvocation *)invocation {
     @synchronized (self) {
         [self _reloadDataWithInvocation:invocation];