]> git.saurik.com Git - cydia.git/commitdiff
Various interface cleanups.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 17 Dec 2008 07:15:36 +0000 (07:15 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:09:21 +0000 (07:09 +0000)
Cydia.app/Test
Cydia.app/menes/menes.js
Cydia.app/menes/style.css
Cydia.app/package.html
Cydia.app/storage.html
Cydia.mm

index 5bfd0902a226f5eab69c072187c46c836bf836ce..c7df4e849af4840726ba92fe12c06411cdd710a0 100755 (executable)
@@ -4,5 +4,6 @@ set -e
 rsync -SPaz --copy-links saurik@carrier.saurik.com:menes/cydia/cydia_iphoneos-arm.deb .
 dpkg -i cydia_iphoneos-arm.deb
 touch /tmp/cydia.log
 rsync -SPaz --copy-links saurik@carrier.saurik.com:menes/cydia/cydia_iphoneos-arm.deb .
 dpkg -i cydia_iphoneos-arm.deb
 touch /tmp/cydia.log
+chown mobile.mobile /tmp/cydia.log
 openURL "${1-cydia://}"
 exec tail /tmp/cydia.log -fn0
 openURL "${1-cydia://}"
 exec tail /tmp/cydia.log -fn0
index 70c5c47be61d6622f9517c31b170f451d9e5da0f..2ca5d7dee23606152548f3b6be3db58d2573e437 100644 (file)
@@ -190,19 +190,46 @@ $.prototype = {
         });
     },
 
         });
     },
 
-    append: function (html) {
+    append: function (children) {
+        if ($.type(children) == "string")
+            $.each(this, function (node) {
+                var doc = $.document(node);
+
+                // XXX: implement wrapper system
+                var div = doc.createElement("div");
+                div.innerHTML = children;
+
+                while (div.childNodes.length != 0) {
+                    var child = div.childNodes[0];
+                    node.appendChild(child);
+                }
+            });
+        else
+            $.each(this, function (node) {
+                $.each(children, function (child) {
+                    node.appendChild(child);
+                });
+            });
+    },
+
+    xpath: function (expression) {
+        var value = $([]);
+
         $.each(this, function (node) {
             var doc = $.document(node);
         $.each(this, function (node) {
             var doc = $.document(node);
+            var results = doc.evaluate(expression, node, null, XPathResult.ANY_TYPE, null);
+            var result;
+            while (result = results.iterateNext())
+                value.add([result]);
+        });
 
 
-            // XXX: implement wrapper system
-            var div = doc.createElement("div");
-            div.innerHTML = html;
+        return value;
+    },
 
 
-            while (div.childNodes.length != 0) {
-                var child = div.childNodes[0];
-                node.appendChild(child);
-            }
-        });
+    clone: function (deep) {
+        return $($.map(this, function (node) {
+            return node.cloneNode(deep);
+        }));
     },
 
     descendants: function (expression) {
     },
 
     descendants: function (expression) {
index b0674588fb79707e9ecc0a3e4ddc6679bb059a7f..0397b5e290e6e1519e311fb13399181b6f12166f 100644 (file)
@@ -55,6 +55,8 @@
     -webkit-border-radius: 0;
     box-sizing: border-box;
     -moz-box-sizing: border-box;
     -webkit-border-radius: 0;
     box-sizing: border-box;
     -moz-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
     font-family: inherit;
     font-size: 100%;
     font-style: inherit;
     font-family: inherit;
     font-size: 100%;
     font-style: inherit;
     margin: 0;
     outline: 0;
     padding: 0;
     margin: 0;
     outline: 0;
     padding: 0;
+    text-decoration: none;
     vertical-align: baseline;
 }
 
     vertical-align: baseline;
 }
 
+a {
+    color: inherit;
+}
+
 sup {
     font-size: smaller;
     margin-top: -6px;
 sup {
     font-size: smaller;
     margin-top: -6px;
@@ -97,14 +104,9 @@ dialog > panel {
     padding: 1px 0;
 }
 
     padding: 1px 0;
 }
 
-a {
-    color: inherit;
-    text-decoration: none;
-    text-underline-style: dotted;
-}
-
 a {
     color: blue;
 a {
     color: blue;
+    text-underline-style: dotted;
 }
 
 strong {
 }
 
 strong {
@@ -241,13 +243,18 @@ fieldset > div img.icon {
 }
 
 panel > block > p,
 }
 
 panel > block > p,
-fieldset > div > p {
+fieldset > div > p,
+fieldset > div > ul {
     margin: 11px 0;
     margin: 11px 0;
-    text-align: center;
 }
 
 fieldset > div > ul {
 }
 
 fieldset > div > ul {
-    margin-left: -20px;
+    margin-left: 13px;
+}
+
+panel > block > p,
+fieldset > div > p {
+    text-align: center;
 }
 
 fieldset > div > p:first-child,
 }
 
 fieldset > div > p:first-child,
index 2b1aca90a5a343f81468b0bef9ce12ee3c2e6da2..09efc40e56a65c016dd97ef4510714aa7518ee48 100644 (file)
     </a>
 </fieldset>
 
     </a>
 </fieldset>
 
-<label class="warnings">Warnings</label>
 <fieldset class="warnings" id="warnings">
     <div id="warning">
         <img class="icon" src="warning.png"/>
 <fieldset class="warnings" id="warnings">
     <div id="warning">
         <img class="icon" src="warning.png"/>
index bd208f9c2090e2bfa3908d20d16e69ad94ad9791..e2347b91a3d25e3e3b440b115c5050dff06f9234 100644 (file)
         }
 
         a.giant-button {
         }
 
         a.giant-button {
+            background-color: rgba(0, 0, 0, 0.15);
+            -webkit-border-radius: 10px;
             color: #193250;
             display: block;
             margin: 8px 10px;
             color: #193250;
             display: block;
             margin: 8px 10px;
+            position: relative;
             text-decoration: none;
             text-decoration: none;
-        }
-
-        a.giant-button > div.contents {
-            position: absolute;
-            text-align: left;
             width: 300px;
             width: 300px;
-            -webkit-background-size: 75px auto;
-            z-index: 2;
         }
 
         }
 
-        a.giant-button > div.contents > piechart {
+        a.giant-button > piechart {
             float: left;
             margin: 10px;
             vertical-align: middle;
         }
 
             float: left;
             margin: 10px;
             vertical-align: middle;
         }
 
-        a.giant-button > div.contents > label {
+        a.giant-button > label {
             display: block;
             float: left;
             font-size: 25px;
             display: block;
             float: left;
             font-size: 25px;
@@ -57,7 +53,7 @@
             width: 155px;
         }
 
             width: 155px;
         }
 
-        a.giant-button > div.contents > div.text {
+        a.giant-button > div.text {
             display: block;
             float: left;
             font-size: 14px;
             display: block;
             float: left;
             font-size: 14px;
@@ -71,7 +67,7 @@
             width: 50%;
         }
 
             width: 50%;
         }
 
-        a.giant-button > div.contents > div.legend {
+        a.giant-button > div.legend {
             float: left;
             font-size: 14px;
             left: 15px;
             float: left;
             font-size: 14px;
             left: 15px;
             width: 290px;
         }
 
             width: 290px;
         }
 
-        a.giant-button > div.background {
-            background-color: #000000;
-            opacity: 0.15;
-            -webkit-border-radius: 10px;
-        }
-
         div.key {
             margin-bottom: 4px;
         }
         div.key {
             margin-bottom: 4px;
         }
 <dialog>
     <panel>
 
 <dialog>
     <panel>
 
-<a class="giant-button">
-    <div class="contents">
-        <piechart><div>
-            <div id="system-left"></div>
-            <div id="system-right">
-                <div class="lslice"></div>
-                <div class="rslice"></div>
-                <div class="tslice"></div>
-                <div class="bslice"></div>
-            </div>
-            <div class="nslice"><div id="system-size"></div></div>
-        </div></piechart>
-
-        <label>System</label>
-        <div class="text">A small partition used to store iPhone OS. Cydia adds a few important programs and libraries.</div>
-
-        <div class="legend" id="system-legend"></div>
-    </div>
-
-    <div class="background" style="height: 149px"></div>
+<a class="giant-button" style="height: 149px">
+    <piechart><div>
+        <div id="system-left"></div>
+        <div id="system-right">
+            <div class="lslice"></div>
+            <div class="rslice"></div>
+            <div class="tslice"></div>
+            <div class="bslice"></div>
+        </div>
+        <div class="nslice"><div id="system-size"></div></div>
+    </div></piechart>
+
+    <label>System</label>
+    <div class="text">A small partition used to store iPhone OS. Cydia adds a few important programs and libraries.</div>
+
+    <div class="legend" id="system-legend"></div>
 </a>
 
 </a>
 
-<a class="giant-button">
-    <div class="contents">
-        <piechart><div>
-            <div id="private-left"></div>
-            <div id="private-right">
-                <div class="lslice"></div>
-                <div class="rslice"></div>
-                <div class="tslice"></div>
-                <div class="bslice"></div>
-            </div>
-            <div class="nslice"><div id="private-size"></div></div>
-        </div></piechart>
-
-        <label>Private</label>
-        <div class="text">Most content is stored on this partition: from applications (Cydia and Apple) to multimedia.</div>
-
-        <div class="legend" id="private-legend"></div>
-    </div>
-
-    <div class="background" style="height: 189px"></div>
+<a class="giant-button" style="height: 189px">
+    <piechart><div>
+        <div id="private-left"></div>
+        <div id="private-right">
+            <div class="lslice"></div>
+            <div class="rslice"></div>
+            <div class="tslice"></div>
+            <div class="bslice"></div>
+        </div>
+        <div class="nslice"><div id="private-size"></div></div>
+    </div></piechart>
+
+    <label>Private</label>
+    <div class="text">Most content is stored on this partition: from applications (Cydia and Apple) to multimedia.</div>
+
+    <div class="legend" id="private-legend"></div>
 </a>
 
     </panel>
 </a>
 
     </panel>
index 87a091dc76bed78d4ad66c6f7aa018c72aca0725..71a57df9b256cd2a280c60ec0751482bc50c46f6 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -1729,6 +1729,8 @@ class Progress :
         [warnings addObject:@"illegal package identifier"];
     else for (size_t i(0); i != length; ++i)
         if (
         [warnings addObject:@"illegal package identifier"];
     else for (size_t i(0); i != length; ++i)
         if (
+            /* XXX: technically this is not allowed */
+            (name[i] < 'A' || name[i] > 'Z') &&
             (name[i] < 'a' || name[i] > 'z') &&
             (name[i] < '0' || name[i] > '9') &&
             (i == 0 || name[i] != '+' && name[i] != '-' && name[i] != '.')
             (name[i] < 'a' || name[i] > 'z') &&
             (name[i] < '0' || name[i] > '9') &&
             (i == 0 || name[i] != '+' && name[i] != '-' && name[i] != '.')
@@ -1736,17 +1738,25 @@ class Progress :
 
     if (strcmp(name, "cydia") != 0) {
         bool cydia = false;
 
     if (strcmp(name, "cydia") != 0) {
         bool cydia = false;
+        bool _private = false;
         bool stash = false;
 
         bool stash = false;
 
+        bool repository = [[self section] isEqualToString:@"Repositories"];
+
         if (NSArray *files = [self files])
             for (NSString *file in files)
                 if (!cydia && [file isEqualToString:@"/Applications/Cydia.app"])
                     cydia = true;
         if (NSArray *files = [self files])
             for (NSString *file in files)
                 if (!cydia && [file isEqualToString:@"/Applications/Cydia.app"])
                     cydia = true;
+                else if (!_private && [file isEqualToString:@"/private"])
+                    _private = true;
                 else if (!stash && [file isEqualToString:@"/var/stash"])
                     stash = true;
 
                 else if (!stash && [file isEqualToString:@"/var/stash"])
                     stash = true;
 
-        if (cydia)
+        /* XXX: this is not sensitive enough. only some folders are valid. */
+        if (cydia && !repository)
             [warnings addObject:@"files installed into Cydia.app"];
             [warnings addObject:@"files installed into Cydia.app"];
+        if (_private)
+            [warnings addObject:@"files installed with /private/*"];
         if (stash)
             [warnings addObject:@"files installed to /var/stash"];
     }
         if (stash)
             [warnings addObject:@"files installed to /var/stash"];
     }
@@ -6997,7 +7007,7 @@ int main(int argc, char *argv[]) { _pooled
         Indices_ = [[NSMutableDictionary alloc] init];*/
 
     Indices_ = [NSMutableDictionary dictionaryWithObjectsAndKeys:
         Indices_ = [[NSMutableDictionary alloc] init];*/
 
     Indices_ = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-        //@"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/server/rating/@", @"Rating",
+        @"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/server/rating/@", @"Rating",
         @"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/repotag/@", @"RepoTag",
     nil];
 
         @"http://"/*"cache.saurik.com/"*/"cydia.saurik.com/repotag/@", @"RepoTag",
     nil];
 
@@ -7033,8 +7043,10 @@ int main(int argc, char *argv[]) { _pooled
     Documents_ = [[[NSMutableArray alloc] initWithCapacity:4] autorelease];
 #endif
 
     Documents_ = [[[NSMutableArray alloc] initWithCapacity:4] autorelease];
 #endif
 
-    if (substrate && access("/Library/MobileSubstrate/MobileSubstrate.dylib", F_OK) == 0)
-        dlopen("/Library/MobileSubstrate/MobileSubstrate.dylib", RTLD_LAZY | RTLD_GLOBAL);
+    if (substrate && access("/Applications/WinterBoard.app/WinterBoard.dylib", F_OK) == 0)
+        dlopen("/Applications/WinterBoard.app/WinterBoard.dylib", RTLD_LAZY | RTLD_GLOBAL);
+    /*if (substrate && access("/Library/MobileSubstrate/MobileSubstrate.dylib", F_OK) == 0)
+        dlopen("/Library/MobileSubstrate/MobileSubstrate.dylib", RTLD_LAZY | RTLD_GLOBAL);*/
 
     if (access("/User", F_OK) != 0)
         system("/usr/libexec/cydia/firmware.sh");
 
     if (access("/User", F_OK) != 0)
         system("/usr/libexec/cydia/firmware.sh");