]> git.saurik.com Git - cydia.git/commitdiff
Fixed trusted and added iSpazio and Depiction.
authorJay Freeman (saurik) <saurik@saurk.com>
Tue, 12 Aug 2008 12:57:17 +0000 (12:57 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:17 +0000 (07:08 +0000)
Cydia.app/Sources/ispaziorepo.com.png [new file with mode: 0644]
Cydia.app/menes/menes.js
Cydia.app/package.html
Cydia.app/package.js
Cydia.mm

diff --git a/Cydia.app/Sources/ispaziorepo.com.png b/Cydia.app/Sources/ispaziorepo.com.png
new file mode 100644 (file)
index 0000000..d6b1a39
Binary files /dev/null and b/Cydia.app/Sources/ispaziorepo.com.png differ
index 1d153bbf2c4116ab77609deff950f32a385dc338..64ec5d0c0082da1d0e596ab9ffc7a4e10e6a12f4 100644 (file)
@@ -24,9 +24,10 @@ var $ = function (arg, doc) {
     else if (type == "string") {
         if (doc == undefined)
             doc = document;
-        if (arg.charAt(0) == '#')
-            return new $([doc.getElementById(arg.substring(1))]);
-        else if (arg.charAt(0) == '.')
+        if (arg.charAt(0) == '#') {
+            var node = doc.getElementById(arg.substring(1));
+            return $(node == null ? [] : [node]);
+        } else if (arg.charAt(0) == '.')
             return new $(doc.getElementsByClassName(arg.substring(1)));
         else
             return $([doc]).descendants(arg);
@@ -201,6 +202,15 @@ $.inject({
         }
     },
 
+    src: {
+        get: function (node) {
+            return node.src;
+        },
+        set: function (node, value) {
+            node.src = value;
+        }
+    },
+
     value: {
         get: function (node) {
             return node.value;
index 1331c7d76faa6b626001076d7ed2691a2d5907a8..c5458028589df57eea00cfad9e7e9d8f0e982776 100644 (file)
         <div id="latest"></div>
     </div>
 
-    <a id="author-link" class="author">
+    <a id="author-href" class="author">
         <label>Author</label>
         <div id="author"></div>
     </a>
+</fieldset>
+
+<div style="width: 320px; overflow: hidden" class="depiction"><iframe
+    id="depiction-src"
+    frameborder="0"
+    width="300"
+    target="_top"
+></iframe></div>
 
+<fieldset class="description">
     <div id="description"></div>
 
-    <a id="homepage-link" class="homepage">
+    <a id="homepage-href">
         <label>More Information</label>
     </a>
 </fieldset>
@@ -36,7 +45,7 @@
         <div id="installed"></div>
     </div>
 
-    <a id="files-link"><label>Filesystem Content</label></a>
+    <a id="files-href"><label>Filesystem Content</label></a>
 </fieldset>
 
 <label>Package Details</label>
         <div id="size"></div>
     </div>
 
-    <a id="maintainer-link" class="maintainer">
+    <a id="maintainer-href" class="maintainer">
         <label>Maintainer</label>
         <div id="maintainer"></div>
     </a>
 
-    <a id="sponsor-link" class="sponsor">
+    <a id="sponsor-href" class="sponsor">
         <label>Sponsor</label>
         <div id="sponsor"></div>
     </a>
index 45390065b8a4e95b20c842e4f937fa6c20cdf6d7..aec81416fee118217d0fcdd97b0d47a3fa4331eb 100644 (file)
@@ -5,8 +5,10 @@
         "name": "Allen Porter",
         "address": "allen.porter@gmail.com"
     },
+    "depiction": "http://planet-iphones.com/repository/info/chromium1.3.php",
     "description": "this is a sample description",
-    "homepage": "http://cydia.saurik.com/terminal.html",
+    //"homepage": "http://cydia.saurik.com/terminal.html",
+    "homepage": "http://planet-iphones.com/repository/info/chromium1.3.php",
     "installed": "286u-4",
     "id": "mobileterminal",
     "section": "Terminal Support",
@@ -34,28 +36,36 @@ $(function () {
         $(".author").remove();
     else {
         $("#author").html(author.name);
-        $("#author-link").href("mailto:" + author.address + "?subject=" + regarding);
+        $("#author-href").href("mailto:" + author.address + "?subject=" + regarding);
     }
 
-    var description = package.description;
-    if (description == null)
-        description = package.tagline;
-    else
-        description = description.replace(/\n/g, "<br/>");
-    $("#description").html(description);
+    var depiction = package.depiction;
+    if (depiction != null) {
+        $(".description").remove();
+        $("#depiction-src").src(depiction);
+    } else {
+        $(".depiction").remove();
+
+        var description = package.description;
+        if (description == null)
+            description = package.tagline;
+        else
+            description = description.replace(/\n/g, "<br/>");
+        $("#description").html(description);
+    }
 
     var homepage = package.homepage;
     if (homepage == null)
         $(".homepage").remove();
     else
-        $("#homepage-link").href(homepage);
+        $("#homepage-href").href(homepage);
 
     var installed = package.installed;
     if (installed == null)
         $(".installed").remove();
     else {
         $("#installed").html(installed);
-        $("#files-link").href("cydia://files/" + id);
+        $("#files-href").href("cydia://files/" + id);
     }
 
     $("#id").html(id);
@@ -77,7 +87,7 @@ $(function () {
         $(".maintainer").remove();
     else {
         $("#maintainer").html(maintainer.name);
-        $("#maintainer-link").href("mailto:" + maintainer.address + "?subject=" + regarding);
+        $("#maintainer-href").href("mailto:" + maintainer.address + "?subject=" + regarding);
     }
 
     var sponsor = package.sponsor;
@@ -85,15 +95,19 @@ $(function () {
         $(".sponsor").remove();
     else {
         $("#sponsor").html(sponsor.name);
-        $("#sponsor-link").href(sponsor.address);
+        $("#sponsor-href").href(sponsor.address);
     }
 
     var source = package.source;
-    if (source == null)
+    if (source == null) {
         $(".source").remove();
-    else {
+        $(".trusted").remove();
+    } else {
         $("#source-name").html(source.name);
 
+        if (!source.trusted)
+            $(".trusted").remove();
+
         var description = source.description;
         if (description == null)
             $(".source-description").remove();
index c8d57c41a217b134473cf3d6ebd2534bacf194ad..4e6d0cae250e22cbf877861e8e682f73a55228e2 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -849,12 +849,6 @@ class Progress :
         distribution_ = [[NSString stringWithUTF8String:index->GetDist().c_str()] retain];
         type_ = [[NSString stringWithUTF8String:index->GetType()] retain];
 
-        description_ = nil;
-        label_ = nil;
-        origin_ = nil;
-        version_ = nil;
-        defaultIcon_ = nil;
-
         debReleaseIndex *dindex(dynamic_cast<debReleaseIndex *>(index));
         if (dindex != NULL) {
             std::ifstream release(dindex->MetaIndexFile("Release").c_str());
@@ -1047,6 +1041,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
     NSString *tagline_;
     NSString *icon_;
     NSString *homepage_;
+    NSString *depiction_;
     Address *sponsor_;
     Address *author_;
     NSArray *tags_;
@@ -1088,6 +1083,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
 - (NSString *) tagline;
 - (NSString *) icon;
 - (NSString *) homepage;
+- (NSString *) depiction;
 - (Address *) author;
 
 - (NSArray *) relationships;
@@ -1133,6 +1129,8 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
         [icon_ release];
     if (homepage_ != nil)
         [homepage_ release];
+    if (depiction_ != nil)
+        [depiction_ release];
     if (sponsor_ != nil)
         [sponsor_ release];
     if (author_ != nil)
@@ -1149,7 +1147,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
 }
 
 + (NSArray *) _attributeKeys {
-    return [NSArray arrayWithObjects:@"author", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"section", @"size", @"source", @"sponsor", @"tagline", nil];
+    return [NSArray arrayWithObjects:@"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"section", @"size", @"source", @"sponsor", @"tagline", nil];
 }
 
 - (NSArray *) attributeKeys {
@@ -1198,6 +1196,9 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
                 homepage_ = Scour("Website", begin, end);
             if (homepage_ != nil)
                 homepage_ = [homepage_ retain];
+            depiction_ = Scour("Depiction", begin, end);
+            if (depiction_ != nil)
+                depiction_ = [depiction_ retain];
             NSString *sponsor = Scour("Sponsor", begin, end);
             if (sponsor != nil)
                 sponsor_ = [[Address addressWithString:sponsor] retain];
@@ -1408,6 +1409,10 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
     return homepage_;
 }
 
+- (NSString *) depiction {
+    return depiction_;
+}
+
 - (Address *) sponsor {
     return sponsor_;
 }
@@ -4318,6 +4323,9 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
 }
 
 - (void) webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame {
+    if ([frame parentFrame] != nil)
+        return;
+
     title_ = [title retain];
     [self setTitle:title];
 }