summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 5b4dc06..015e071 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4113,6 +4113,8 @@ static NSString *Warning_;
return @"refreshSources";
else if (selector == @selector(removeButton))
return @"removeButton";
+ else if (selector == @selector(substitutePackageNames:))
+ return @"substitutePackageNames";
else if (selector == @selector(scrollToBottom:))
return @"scrollToBottom";
else if (selector == @selector(setButtonImage:withStyle:toFunction:))
@@ -4279,6 +4281,17 @@ static NSString *Warning_;
[delegate_ performSelectorOnMainThread:@selector(installPackages:) withObject:packages waitUntilDone:NO];
}
+- (NSString *) substitutePackageNames:(NSString *)message {
+ NSMutableArray *words([[message componentsSeparatedByString:@" "] mutableCopy]);
+ for (size_t i(0), e([words count]); i != e; ++i) {
+ NSString *word([words objectAtIndex:i]);
+ if (Package *package = [[Database sharedInstance] packageWithName:word])
+ [words replaceObjectAtIndex:i withObject:[package name]];
+ }
+
+ return [words componentsJoinedByString:@" "];
+}
+
- (void) removeButton {
[indirect_ removeButton];
}