]> git.saurik.com Git - cydia.git/commitdiff
Renaming folder structure, added settings icon, and fixed crash bug for everyone...
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Feb 2008 12:47:52 +0000 (12:47 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Feb 2008 12:47:52 +0000 (12:47 +0000)
35 files changed:
Cydia.app/Default.png [new file with mode: 0644]
Cydia.app/Info.plist [new file with mode: 0644]
Cydia.app/Test [new file with mode: 0755]
Cydia.app/changes-dn.png [new file with mode: 0644]
Cydia.app/changes-up.png [new file with mode: 0644]
Cydia.app/featured-dn.png [new file with mode: 0644]
Cydia.app/featured-up.png [new file with mode: 0644]
Cydia.app/folder.png [new file with mode: 0644]
Cydia.app/icon.png [new file with mode: 0644]
Cydia.app/install-dn.png [new file with mode: 0644]
Cydia.app/install-up.png [new file with mode: 0644]
Cydia.app/manage-dn.png [new file with mode: 0644]
Cydia.app/manage-up.png [new file with mode: 0644]
Cydia.app/pinstripe.png [new file with mode: 0644]
Cydia.app/reload.png [new file with mode: 0644]
Cydia.app/search-dn.png [new file with mode: 0644]
Cydia.app/search-up.png [new file with mode: 0644]
Cydia.mm
data/Default.png [deleted file]
data/Info.plist [deleted file]
data/Test [deleted file]
data/changes-dn.png [deleted file]
data/changes-up.png [deleted file]
data/featured-dn.png [deleted file]
data/featured-up.png [deleted file]
data/folder.png [deleted file]
data/icon.png [deleted file]
data/install-dn.png [deleted file]
data/install-up.png [deleted file]
data/manage-dn.png [deleted file]
data/manage-up.png [deleted file]
data/pinstripe.png [deleted file]
data/reload.png [deleted file]
data/search-dn.png [deleted file]
data/search-up.png [deleted file]

diff --git a/Cydia.app/Default.png b/Cydia.app/Default.png
new file mode 100644 (file)
index 0000000..e83e6f3
Binary files /dev/null and b/Cydia.app/Default.png differ
diff --git a/Cydia.app/Info.plist b/Cydia.app/Info.plist
new file mode 100644 (file)
index 0000000..2490ace
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+
+<dict>
+    <key>CFBundleDevelopmentRegion</key>
+    <string>en</string>
+
+    <key>CFBundleExecutable</key>
+    <string>Cydia</string>
+
+    <key>CFBundleIdentifier</key>
+    <string>com.saurik.Cydia</string>
+
+    <key>CFBundleInfoDictionaryVersion</key>
+    <string>6.0</string>
+
+    <key>CFBundleName</key>
+    <string>Cydia</string>
+
+    <key>CFBundlePackageType</key>
+    <string>APPL</string>
+
+    <key>CFBundleShortVersionString</key>
+    <string>0.9</string>
+
+    <key>CFBundleSignature</key>
+    <string>????</string>
+
+    <key>CFBundleVersion</key>
+    <string>0.9</string>
+</dict>
+
+</plist>
diff --git a/Cydia.app/Test b/Cydia.app/Test
new file mode 100755 (executable)
index 0000000..ad2582e
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+cd "$(dirname "$0")"
+scp -p saurik@carrier.saurik.com:menes/cydia/Cydia .
+chmod +s Cydia
+su -c ./Cydia mobile
diff --git a/Cydia.app/changes-dn.png b/Cydia.app/changes-dn.png
new file mode 100644 (file)
index 0000000..cfd31f1
Binary files /dev/null and b/Cydia.app/changes-dn.png differ
diff --git a/Cydia.app/changes-up.png b/Cydia.app/changes-up.png
new file mode 100644 (file)
index 0000000..654208f
Binary files /dev/null and b/Cydia.app/changes-up.png differ
diff --git a/Cydia.app/featured-dn.png b/Cydia.app/featured-dn.png
new file mode 100644 (file)
index 0000000..c02c120
Binary files /dev/null and b/Cydia.app/featured-dn.png differ
diff --git a/Cydia.app/featured-up.png b/Cydia.app/featured-up.png
new file mode 100644 (file)
index 0000000..0611697
Binary files /dev/null and b/Cydia.app/featured-up.png differ
diff --git a/Cydia.app/folder.png b/Cydia.app/folder.png
new file mode 100644 (file)
index 0000000..b628e95
Binary files /dev/null and b/Cydia.app/folder.png differ
diff --git a/Cydia.app/icon.png b/Cydia.app/icon.png
new file mode 100644 (file)
index 0000000..5048c8f
Binary files /dev/null and b/Cydia.app/icon.png differ
diff --git a/Cydia.app/install-dn.png b/Cydia.app/install-dn.png
new file mode 100644 (file)
index 0000000..7e11a95
Binary files /dev/null and b/Cydia.app/install-dn.png differ
diff --git a/Cydia.app/install-up.png b/Cydia.app/install-up.png
new file mode 100644 (file)
index 0000000..1b7b1d9
Binary files /dev/null and b/Cydia.app/install-up.png differ
diff --git a/Cydia.app/manage-dn.png b/Cydia.app/manage-dn.png
new file mode 100644 (file)
index 0000000..727d067
Binary files /dev/null and b/Cydia.app/manage-dn.png differ
diff --git a/Cydia.app/manage-up.png b/Cydia.app/manage-up.png
new file mode 100644 (file)
index 0000000..9513a7c
Binary files /dev/null and b/Cydia.app/manage-up.png differ
diff --git a/Cydia.app/pinstripe.png b/Cydia.app/pinstripe.png
new file mode 100644 (file)
index 0000000..adabdd7
Binary files /dev/null and b/Cydia.app/pinstripe.png differ
diff --git a/Cydia.app/reload.png b/Cydia.app/reload.png
new file mode 100644 (file)
index 0000000..71dc424
Binary files /dev/null and b/Cydia.app/reload.png differ
diff --git a/Cydia.app/search-dn.png b/Cydia.app/search-dn.png
new file mode 100644 (file)
index 0000000..56ce631
Binary files /dev/null and b/Cydia.app/search-dn.png differ
diff --git a/Cydia.app/search-up.png b/Cydia.app/search-up.png
new file mode 100644 (file)
index 0000000..4083f1b
Binary files /dev/null and b/Cydia.app/search-up.png differ
index 9796f468f88a01cfec296063dd02c37b1da6a085..7ecd9a58c4e5fcbfd0b40e0e70df22524ae5111e 100644 (file)
--- 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 {
diff --git a/data/Default.png b/data/Default.png
deleted file mode 100644 (file)
index e83e6f3..0000000
Binary files a/data/Default.png and /dev/null differ
diff --git a/data/Info.plist b/data/Info.plist
deleted file mode 100644 (file)
index 2490ace..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-
-<dict>
-    <key>CFBundleDevelopmentRegion</key>
-    <string>en</string>
-
-    <key>CFBundleExecutable</key>
-    <string>Cydia</string>
-
-    <key>CFBundleIdentifier</key>
-    <string>com.saurik.Cydia</string>
-
-    <key>CFBundleInfoDictionaryVersion</key>
-    <string>6.0</string>
-
-    <key>CFBundleName</key>
-    <string>Cydia</string>
-
-    <key>CFBundlePackageType</key>
-    <string>APPL</string>
-
-    <key>CFBundleShortVersionString</key>
-    <string>0.9</string>
-
-    <key>CFBundleSignature</key>
-    <string>????</string>
-
-    <key>CFBundleVersion</key>
-    <string>0.9</string>
-</dict>
-
-</plist>
diff --git a/data/Test b/data/Test
deleted file mode 100755 (executable)
index ad2582e..0000000
--- a/data/Test
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-set -e
-cd "$(dirname "$0")"
-scp -p saurik@carrier.saurik.com:menes/cydia/Cydia .
-chmod +s Cydia
-su -c ./Cydia mobile
diff --git a/data/changes-dn.png b/data/changes-dn.png
deleted file mode 100644 (file)
index cfd31f1..0000000
Binary files a/data/changes-dn.png and /dev/null differ
diff --git a/data/changes-up.png b/data/changes-up.png
deleted file mode 100644 (file)
index 654208f..0000000
Binary files a/data/changes-up.png and /dev/null differ
diff --git a/data/featured-dn.png b/data/featured-dn.png
deleted file mode 100644 (file)
index c02c120..0000000
Binary files a/data/featured-dn.png and /dev/null differ
diff --git a/data/featured-up.png b/data/featured-up.png
deleted file mode 100644 (file)
index 0611697..0000000
Binary files a/data/featured-up.png and /dev/null differ
diff --git a/data/folder.png b/data/folder.png
deleted file mode 100644 (file)
index b628e95..0000000
Binary files a/data/folder.png and /dev/null differ
diff --git a/data/icon.png b/data/icon.png
deleted file mode 100644 (file)
index 5048c8f..0000000
Binary files a/data/icon.png and /dev/null differ
diff --git a/data/install-dn.png b/data/install-dn.png
deleted file mode 100644 (file)
index 7e11a95..0000000
Binary files a/data/install-dn.png and /dev/null differ
diff --git a/data/install-up.png b/data/install-up.png
deleted file mode 100644 (file)
index 1b7b1d9..0000000
Binary files a/data/install-up.png and /dev/null differ
diff --git a/data/manage-dn.png b/data/manage-dn.png
deleted file mode 100644 (file)
index 727d067..0000000
Binary files a/data/manage-dn.png and /dev/null differ
diff --git a/data/manage-up.png b/data/manage-up.png
deleted file mode 100644 (file)
index 9513a7c..0000000
Binary files a/data/manage-up.png and /dev/null differ
diff --git a/data/pinstripe.png b/data/pinstripe.png
deleted file mode 100644 (file)
index adabdd7..0000000
Binary files a/data/pinstripe.png and /dev/null differ
diff --git a/data/reload.png b/data/reload.png
deleted file mode 100644 (file)
index 71dc424..0000000
Binary files a/data/reload.png and /dev/null differ
diff --git a/data/search-dn.png b/data/search-dn.png
deleted file mode 100644 (file)
index 56ce631..0000000
Binary files a/data/search-dn.png and /dev/null differ
diff --git a/data/search-up.png b/data/search-up.png
deleted file mode 100644 (file)
index 4083f1b..0000000
Binary files a/data/search-up.png and /dev/null differ