summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cydia.app/Default.png (renamed from data/Default.png)bin1417 -> 1417 bytes
-rw-r--r--Cydia.app/Info.plist (renamed from data/Info.plist)0
-rwxr-xr-xCydia.app/Test (renamed from data/Test)0
-rw-r--r--Cydia.app/changes-dn.png (renamed from data/changes-dn.png)bin2211 -> 2211 bytes
-rw-r--r--Cydia.app/changes-up.png (renamed from data/changes-up.png)bin1724 -> 1724 bytes
-rw-r--r--Cydia.app/featured-dn.png (renamed from data/featured-dn.png)bin2181 -> 2181 bytes
-rw-r--r--Cydia.app/featured-up.png (renamed from data/featured-up.png)bin1847 -> 1847 bytes
-rw-r--r--Cydia.app/folder.png (renamed from data/folder.png)bin1998 -> 1998 bytes
-rw-r--r--Cydia.app/icon.png (renamed from data/icon.png)bin4158 -> 4158 bytes
-rw-r--r--Cydia.app/install-dn.png (renamed from data/install-dn.png)bin2773 -> 2773 bytes
-rw-r--r--Cydia.app/install-up.png (renamed from data/install-up.png)bin2174 -> 2174 bytes
-rw-r--r--Cydia.app/manage-dn.png (renamed from data/manage-dn.png)bin1687 -> 1687 bytes
-rw-r--r--Cydia.app/manage-up.png (renamed from data/manage-up.png)bin1326 -> 1326 bytes
-rw-r--r--Cydia.app/pinstripe.png (renamed from data/pinstripe.png)bin1096 -> 1096 bytes
-rw-r--r--Cydia.app/reload.png (renamed from data/reload.png)bin976 -> 976 bytes
-rw-r--r--Cydia.app/search-dn.png (renamed from data/search-dn.png)bin1707 -> 1707 bytes
-rw-r--r--Cydia.app/search-up.png (renamed from data/search-up.png)bin1333 -> 1333 bytes
-rw-r--r--Cydia.mm50
18 files changed, 28 insertions, 22 deletions
diff --git a/data/Default.png b/Cydia.app/Default.png
index e83e6f3..e83e6f3 100644
--- a/data/Default.png
+++ b/Cydia.app/Default.png
Binary files differ
diff --git a/data/Info.plist b/Cydia.app/Info.plist
index 2490ace..2490ace 100644
--- a/data/Info.plist
+++ b/Cydia.app/Info.plist
diff --git a/data/Test b/Cydia.app/Test
index ad2582e..ad2582e 100755
--- a/data/Test
+++ b/Cydia.app/Test
diff --git a/data/changes-dn.png b/Cydia.app/changes-dn.png
index cfd31f1..cfd31f1 100644
--- a/data/changes-dn.png
+++ b/Cydia.app/changes-dn.png
Binary files differ
diff --git a/data/changes-up.png b/Cydia.app/changes-up.png
index 654208f..654208f 100644
--- a/data/changes-up.png
+++ b/Cydia.app/changes-up.png
Binary files differ
diff --git a/data/featured-dn.png b/Cydia.app/featured-dn.png
index c02c120..c02c120 100644
--- a/data/featured-dn.png
+++ b/Cydia.app/featured-dn.png
Binary files differ
diff --git a/data/featured-up.png b/Cydia.app/featured-up.png
index 0611697..0611697 100644
--- a/data/featured-up.png
+++ b/Cydia.app/featured-up.png
Binary files differ
diff --git a/data/folder.png b/Cydia.app/folder.png
index b628e95..b628e95 100644
--- a/data/folder.png
+++ b/Cydia.app/folder.png
Binary files differ
diff --git a/data/icon.png b/Cydia.app/icon.png
index 5048c8f..5048c8f 100644
--- a/data/icon.png
+++ b/Cydia.app/icon.png
Binary files differ
diff --git a/data/install-dn.png b/Cydia.app/install-dn.png
index 7e11a95..7e11a95 100644
--- a/data/install-dn.png
+++ b/Cydia.app/install-dn.png
Binary files differ
diff --git a/data/install-up.png b/Cydia.app/install-up.png
index 1b7b1d9..1b7b1d9 100644
--- a/data/install-up.png
+++ b/Cydia.app/install-up.png
Binary files differ
diff --git a/data/manage-dn.png b/Cydia.app/manage-dn.png
index 727d067..727d067 100644
--- a/data/manage-dn.png
+++ b/Cydia.app/manage-dn.png
Binary files differ
diff --git a/data/manage-up.png b/Cydia.app/manage-up.png
index 9513a7c..9513a7c 100644
--- a/data/manage-up.png
+++ b/Cydia.app/manage-up.png
Binary files differ
diff --git a/data/pinstripe.png b/Cydia.app/pinstripe.png
index adabdd7..adabdd7 100644
--- a/data/pinstripe.png
+++ b/Cydia.app/pinstripe.png
Binary files differ
diff --git a/data/reload.png b/Cydia.app/reload.png
index 71dc424..71dc424 100644
--- a/data/reload.png
+++ b/Cydia.app/reload.png
Binary files differ
diff --git a/data/search-dn.png b/Cydia.app/search-dn.png
index 56ce631..56ce631 100644
--- a/data/search-dn.png
+++ b/Cydia.app/search-dn.png
Binary files differ
diff --git a/data/search-up.png b/Cydia.app/search-up.png
index 4083f1b..4083f1b 100644
--- a/data/search-up.png
+++ b/Cydia.app/search-up.png
Binary files differ
diff --git a/Cydia.mm b/Cydia.mm
index 9796f46..7ecd9a5 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -178,6 +178,23 @@ static NSMutableDictionary *Metadata_;
static NSMutableDictionary *Packages_;
static NSDate *now_;
+NSString *GetLastUpdate() {
+ NSDate *update = [Metadata_ objectForKey:@"LastUpdate"];
+
+ if (update == nil)
+ return @"Never or Unknown";
+
+ CFLocaleRef locale = CFLocaleCopyCurrent();
+ CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterMediumStyle, kCFDateFormatterMediumStyle);
+ CFStringRef formatted = CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) update);
+
+ CFRelease(formatter);
+ CFRelease(formatted);
+ CFRelease(locale);
+
+ return [(NSString *) formatted autorelease];
+}
+
@protocol ProgressDelegate
- (void) setError:(NSString *)error;
- (void) setTitle:(NSString *)title;
@@ -590,17 +607,7 @@ inline float interpolate(float begin, float end, float fraction) {
}
- (void) setPrompt {
- NSDate *update = [Metadata_ objectForKey:@"LastUpdate"];
-
- CFLocaleRef locale = CFLocaleCopyCurrent();
- CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterMediumStyle, kCFDateFormatterMediumStyle);
- CFStringRef formatted = CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) update);
-
- [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", (NSString *) formatted]];
-
- CFRelease(formatter);
- CFRelease(formatted);
- CFRelease(locale);
+ [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", GetLastUpdate()]];
}
@end
@@ -898,6 +905,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
NSString *tagline_;
NSString *icon_;
NSString *bundle_;
+ NSString *website_;
}
- (void) dealloc;
@@ -922,6 +930,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
- (NSString *) tagline;
- (NSString *) icon;
- (NSString *) bundle;
+- (NSString *) website;
- (BOOL) matches:(NSString *)text;
@@ -978,6 +987,9 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
bundle_ = Scour("Bundle", begin, end);
if (bundle_ != nil)
bundle_ = [bundle_ retain];
+ website_ = Scour("Website", begin, end);
+ if (website_ != nil)
+ website_ = [website_ retain];
NSMutableDictionary *metadata = [Packages_ objectForKey:id_];
if (metadata == nil) {
@@ -1074,6 +1086,10 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
return bundle_;
}
+- (NSString *) website {
+ return website_;
+}
+
- (BOOL) matches:(NSString *)text {
if (text == nil)
return NO;
@@ -3142,17 +3158,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
}
- (void) setPrompt {
- NSDate *update = [Metadata_ objectForKey:@"LastUpdate"];
-
- CFLocaleRef locale = CFLocaleCopyCurrent();
- CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterMediumStyle, kCFDateFormatterMediumStyle);
- CFStringRef formatted = CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) update);
-
- [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", (NSString *) formatted]];
-
- CFRelease(formatter);
- CFRelease(formatted);
- CFRelease(locale);
+ [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", GetLastUpdate()]];
}
- (void) resolve {