diff options
-rw-r--r-- | Cydia.app/Default.png (renamed from data/Default.png) | bin | 1417 -> 1417 bytes | |||
-rw-r--r-- | Cydia.app/Info.plist (renamed from data/Info.plist) | 0 | ||||
-rwxr-xr-x | Cydia.app/Test (renamed from data/Test) | 0 | ||||
-rw-r--r-- | Cydia.app/changes-dn.png (renamed from data/changes-dn.png) | bin | 2211 -> 2211 bytes | |||
-rw-r--r-- | Cydia.app/changes-up.png (renamed from data/changes-up.png) | bin | 1724 -> 1724 bytes | |||
-rw-r--r-- | Cydia.app/featured-dn.png (renamed from data/featured-dn.png) | bin | 2181 -> 2181 bytes | |||
-rw-r--r-- | Cydia.app/featured-up.png (renamed from data/featured-up.png) | bin | 1847 -> 1847 bytes | |||
-rw-r--r-- | Cydia.app/folder.png (renamed from data/folder.png) | bin | 1998 -> 1998 bytes | |||
-rw-r--r-- | Cydia.app/icon.png (renamed from data/icon.png) | bin | 4158 -> 4158 bytes | |||
-rw-r--r-- | Cydia.app/install-dn.png (renamed from data/install-dn.png) | bin | 2773 -> 2773 bytes | |||
-rw-r--r-- | Cydia.app/install-up.png (renamed from data/install-up.png) | bin | 2174 -> 2174 bytes | |||
-rw-r--r-- | Cydia.app/manage-dn.png (renamed from data/manage-dn.png) | bin | 1687 -> 1687 bytes | |||
-rw-r--r-- | Cydia.app/manage-up.png (renamed from data/manage-up.png) | bin | 1326 -> 1326 bytes | |||
-rw-r--r-- | Cydia.app/pinstripe.png (renamed from data/pinstripe.png) | bin | 1096 -> 1096 bytes | |||
-rw-r--r-- | Cydia.app/reload.png (renamed from data/reload.png) | bin | 976 -> 976 bytes | |||
-rw-r--r-- | Cydia.app/search-dn.png (renamed from data/search-dn.png) | bin | 1707 -> 1707 bytes | |||
-rw-r--r-- | Cydia.app/search-up.png (renamed from data/search-up.png) | bin | 1333 -> 1333 bytes | |||
-rw-r--r-- | Cydia.mm | 50 |
18 files changed, 28 insertions, 22 deletions
diff --git a/data/Default.png b/Cydia.app/Default.png Binary files differindex e83e6f3..e83e6f3 100644 --- a/data/Default.png +++ b/Cydia.app/Default.png 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 Binary files differindex cfd31f1..cfd31f1 100644 --- a/data/changes-dn.png +++ b/Cydia.app/changes-dn.png diff --git a/data/changes-up.png b/Cydia.app/changes-up.png Binary files differindex 654208f..654208f 100644 --- a/data/changes-up.png +++ b/Cydia.app/changes-up.png diff --git a/data/featured-dn.png b/Cydia.app/featured-dn.png Binary files differindex c02c120..c02c120 100644 --- a/data/featured-dn.png +++ b/Cydia.app/featured-dn.png diff --git a/data/featured-up.png b/Cydia.app/featured-up.png Binary files differindex 0611697..0611697 100644 --- a/data/featured-up.png +++ b/Cydia.app/featured-up.png diff --git a/data/folder.png b/Cydia.app/folder.png Binary files differindex b628e95..b628e95 100644 --- a/data/folder.png +++ b/Cydia.app/folder.png diff --git a/data/icon.png b/Cydia.app/icon.png Binary files differindex 5048c8f..5048c8f 100644 --- a/data/icon.png +++ b/Cydia.app/icon.png diff --git a/data/install-dn.png b/Cydia.app/install-dn.png Binary files differindex 7e11a95..7e11a95 100644 --- a/data/install-dn.png +++ b/Cydia.app/install-dn.png diff --git a/data/install-up.png b/Cydia.app/install-up.png Binary files differindex 1b7b1d9..1b7b1d9 100644 --- a/data/install-up.png +++ b/Cydia.app/install-up.png diff --git a/data/manage-dn.png b/Cydia.app/manage-dn.png Binary files differindex 727d067..727d067 100644 --- a/data/manage-dn.png +++ b/Cydia.app/manage-dn.png diff --git a/data/manage-up.png b/Cydia.app/manage-up.png Binary files differindex 9513a7c..9513a7c 100644 --- a/data/manage-up.png +++ b/Cydia.app/manage-up.png diff --git a/data/pinstripe.png b/Cydia.app/pinstripe.png Binary files differindex adabdd7..adabdd7 100644 --- a/data/pinstripe.png +++ b/Cydia.app/pinstripe.png diff --git a/data/reload.png b/Cydia.app/reload.png Binary files differindex 71dc424..71dc424 100644 --- a/data/reload.png +++ b/Cydia.app/reload.png diff --git a/data/search-dn.png b/Cydia.app/search-dn.png Binary files differindex 56ce631..56ce631 100644 --- a/data/search-dn.png +++ b/Cydia.app/search-dn.png diff --git a/data/search-up.png b/Cydia.app/search-up.png Binary files differindex 4083f1b..4083f1b 100644 --- a/data/search-up.png +++ b/Cydia.app/search-up.png @@ -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 { |