summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-04-25 07:49:58 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2008-04-25 07:49:58 +0000
commit4cf4165e8f0fc78a905fc9c421c0728e00ce4905 (patch)
tree7bd024a55aca4f0fa8355afd4e56396c54fd5329 /Cydia.mm
parent7fea16f2972afd5c465665d9b15735d8702cb764 (diff)
Added the section to the package table.
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm22
1 files changed, 13 insertions, 9 deletions
diff --git a/Cydia.mm b/Cydia.mm
index cc78ddb..e5f198c 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -507,6 +507,17 @@ UITextView *GetTextView(NSString *value, float left, bool html) {
return text;
}
+
+NSString *Simplify(NSString *title) {
+ const char *data = [title UTF8String];
+ size_t size = [title length];
+
+ Pcre title_r("^(.*?)( \\(.*\\))?$");
+ if (title_r(data, size))
+ return title_r[1];
+ else
+ return title;
+}
/* }}} */
@class Package;
@@ -1630,14 +1641,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
if ([pages_ count] != 0)
[[pages_ lastObject] setPageActive:NO];
- NSString *title = [page title]; {
- const char *data = [title UTF8String];
- size_t size = [title length];
-
- Pcre title_r("^(.*?)( \\(.*\\))?$");
- if (title_r(data, size))
- title = title_r[1];
- }
+ NSString *title = Simplify([page title]);
NSString *backButtonTitle = [page backButtonTitle];
if (backButtonTitle == nil)
@@ -2438,7 +2442,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
trusted = false;
}
- [source_ setText:[NSString stringWithFormat:@"from %@", label]];
+ [source_ setText:[NSString stringWithFormat:@"from %@ (%@)", label, Simplify([package section])]];
if (trusted)
[self addSubview:trusted_];