]> git.saurik.com Git - cydia.git/commitdiff
Checkpoint before trying to solve the bottom alignment issue.
authorJay Freeman (saurik) <saurik@saurk.com>
Wed, 15 Oct 2008 08:06:50 +0000 (08:06 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:50 +0000 (07:08 +0000)
Cydia.app/confirm.js
Cydia.app/menes/style.css
Cydia.app/package.html
Cydia.mm

index 785448c195e3c9a96e816821a986d0c62190cdd1..09a121cd29c6cac6734bb1a48af286c68b243d1a 100644 (file)
@@ -37,7 +37,7 @@ $(function () {
         var length = list.length;
 
         if (length != 0) {
-            $("#modifications").append("<div>" +
+            $("#modifications").append("<div class=\"clearfix\">" +
                 "<label>" + keys[i] + "</label>" +
                 "<div id=\"i" + i + "\"></div>" +
             "</div>");
index ce6cd53ebde166ac7bdff8d7a43529e8bc87aafa..544f2afa4026f446238ec26696d9cad9c4177982 100644 (file)
 }
 
 .clearfix {
-    display: inline-block;
-}
-
-html[xmlns] .clearfix {
     display: block;
 }
-
-* html .clearfix {
-    height: 1%;
-}
 /* }}} */
 
 * {
@@ -154,8 +146,22 @@ pre {
 }
 /* }}} */
 /* fieldset {{{ */
+.dialog > .panel > block {
+    background-color: #c7ced5;
+    border-bottom: 1px solid #999999;
+    border-top: 1px solid #999999;
+    display: block;
+    font-size: 16px;
+    margin: 9px 10px;
+    padding: 0 10px;
+}
+
+.dialog > .panel > block > hr {
+    border-width: 1px 0 0 0;
+}
+
 .dialog > .panel > fieldset {
-    background: #ffffff;
+    background-color: #ffffff;
     border: 1px solid #999999;
     -webkit-border-radius: 10px;
     font-size: 16px;
@@ -191,10 +197,10 @@ pre {
     margin: -13px 5px -10px -10px;
     max-height: 30px;
     min-width: 30px;
-    vertical-align: middle;
     width: 30px;
 }
 
+.dialog > .panel > block > p,
 .dialog > .panel > fieldset > div > p {
     margin: 11px 0;
     text-align: center;
index 95fb823fcc52ed39f88ed9dee89f18c5a0119eaa..7c58967856aa1e96fc2f88b68c733d9d5ccbace0 100644 (file)
         }
 
         #depiction {
-            margin-bottom: -7px;
+            margin: -8px 0;
             overflow: hidden;
             width: 320px;
         }
 
         #notice {
-            margin-bottom: -14px;
+            margin: -8px 0 -9px 0;
             overflow: hidden;
             width: 320px;
         }
         }
 
         #content {
-            float: right;
             margin: auto 0;
+            position: absolute;
+            left: 72px;
         }
 
         #content > div {
         #latest {
             color: #335588;
         }
+
+        #description {
+            background-color: #c7ced5;
+            border-bottom: 1px solid #999999;
+            border-top: 1px solid #999999;
+            font-size: 16px;
+            margin: 9px 10px;
+            padding: 10px;
+        }
     </style>
 </head><body><div class="page">
 <div class="dialog">
     width="320"
     height="0"
     target="_top"
-    onLoad="loaded()"
+    onLoad_="loaded()"
 ></iframe></div>
 
 <!--hr id="lower-bar" class="depiction"/-->
 
-<fieldset class="description">
-    <div id="description"></div>
+<div id="description" class="description"></div>
 
+<fieldset class="description homepage">
     <a class="homepage" id="homepage-href">
         <img class="icon" src="web.png"/>
         <label>More Information</label>
index b4762a1957c73bd9c0090abca7265e8402aad780..0b92c4f37dd37d3e4fd841e7d2c7d2cd00eac302 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -249,17 +249,19 @@ extern NSString * const kCAFilterNearest;
 
 #define lprintf(args...) fprintf(stderr, args)
 
-#define ForSaurik 1
+#define ForRelease 0
+#define ForSaurik 1 && !ForRelease
 #define RecycleWebViews 0
+#define AlwaysReload 0 && !ForRelease
 
 /* Radix Sort {{{ */
 @interface NSMutableArray (Radix)
-- (void) radixUsingSelector:(SEL)selector withObject:(id)object;
+- (void) radixSortUsingSelector:(SEL)selector withObject:(id)object;
 @end
 
 @implementation NSMutableArray (Radix)
 
-- (void) radixUsingSelector:(SEL)selector withObject:(id)object {
+- (void) radixSortUsingSelector:(SEL)selector withObject:(id)object {
     NSInvocation *invocation([NSInvocation invocationWithMethodSignature:[NSMethodSignature signatureWithObjCTypes:"L12@0:4@8"]]);
     [invocation setSelector:selector];
     [invocation setArgument:&object atIndex:2];
@@ -745,6 +747,7 @@ class Status :
     }
 
     virtual void Fetch(pkgAcquire::ItemDesc &item) {
+        //NSString *name([NSString stringWithUTF8String:item.ShortDesc.c_str()]);
         [delegate_ setProgressTitle:[NSString stringWithUTF8String:("Downloading " + item.ShortDesc).c_str()]];
     }
 
@@ -1294,7 +1297,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
 
         version_ = [database_ policy]->GetCandidateVer(iterator_);
         NSString *latest = version_.end() ? nil : [NSString stringWithUTF8String:version_.VerStr()];
-        latest_ = [StripVersion(latest) retain];
+        latest_ = latest == nil ? nil : [StripVersion(latest) retain];
 
         pkgCache::VerIterator current = iterator_.CurrentVer();
         NSString *installed = current.end() ? nil : [NSString stringWithUTF8String:current.VerStr()];
@@ -1517,10 +1520,8 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
 
     if (current.end())
         return essential && [self essential];
-    else {
-        pkgCache::VerIterator candidate = [database_ policy]->GetCandidateVer(iterator_);
-        return !candidate.end() && candidate != current;
-    }
+    else
+        return !version_.end() && version_ != current;
 }
 
 - (BOOL) essential {
@@ -2049,9 +2050,9 @@ static NSArray *Finishes_;
                     withObject:[NSArray arrayWithObjects:string, id, nil]
                     waitUntilDone:YES
                 ];
-            else if (type == "pmstatus")
+            else if (type == "pmstatus") {
                 [delegate_ setProgressTitle:string];
-            else if (type == "pmconffile")
+            else if (type == "pmconffile")
                 [delegate_ setConfigurationData:string];
             else _assert(false);
         } else _assert(false);
@@ -2247,6 +2248,7 @@ static NSArray *Finishes_;
 
     cache_.Close();
 
+    _trace();
     if (!cache_.Open(progress_, true)) {
         std::string error;
         if (!_error->PopMessage(error))
@@ -2265,6 +2267,7 @@ static NSArray *Finishes_;
 
         return;
     }
+    _trace();
 
     now_ = [[NSDate date] retain];
 
@@ -2297,11 +2300,13 @@ static NSArray *Finishes_;
     }
 
     [packages_ removeAllObjects];
+    _trace();
     for (pkgCache::PkgIterator iterator = cache_->PkgBegin(); !iterator.end(); ++iterator)
         if (Package *package = [Package packageWithIterator:iterator database:self])
             [packages_ addObject:package];
-
+    _trace();
     [packages_ sortUsingSelector:@selector(compareByName:)];
+    _trace();
 }
 
 - (void) configure {
@@ -2777,6 +2782,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [self cancel];
 }
 
+#if !AlwaysReload
 - (void) _rightButtonClicked {
     if (essential_ != nil)
         [essential_ popupAlertAnimated:YES];
@@ -2786,6 +2792,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         [delegate_ confirm];
     }
 }
+#endif
 
 @end
 /* }}} */
@@ -3284,7 +3291,14 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) _setProgressTitle:(NSString *)title {
-    [status_ setText:title];
+    NSMutableArray *words([[title componentsSeparatedByString:@" "] mutableCopy]);
+    for (size_t i(0), e([words count]); i != e; ++i) {
+        NSString *word([words objectAtIndex:i]);
+        if (Package *package = [database_ packageWithName:word])
+            [words replaceObjectAtIndex:i withObject:[package name]];
+    }
+
+    [status_ setText:[words componentsJoinedByString:@" "]];
 }
 
 - (void) _setProgressPercent:(NSNumber *)percent {
@@ -3775,6 +3789,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [super webView:sender didClearWindowObject:window forFrame:frame];
 }
 
+#if !AlwaysReload
 - (void) _rightButtonClicked {
     /*[super _rightButtonClicked];
     return;*/
@@ -3798,6 +3813,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         ] autorelease]];
     }
 }
+#endif
 
 - (NSString *) _rightButtonTitle {
     int count = [buttons_ count];
@@ -5843,7 +5859,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     }
 
     _trace();
-    [packages_ radixUsingSelector:@selector(compareForChanges) withObject:nil];
+    [packages_ radixSortUsingSelector:@selector(compareForChanges) withObject:nil];
     _trace();
 
     Section *upgradable = [[[Section alloc] initWithName:@"Available Upgrades"] autorelease];
@@ -6306,7 +6322,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         case 1: switch (row) {
             case 0: {
                 UIPreferencesControlTableCell *cell([[[UIPreferencesControlTableCell alloc] init] autorelease]);
-                [cell setTitle:@"Changes only shows upgrades to installed packages. This minimizes spam from packagers. Activate this to see upgrades to this package even when it is not installed."];
+                [cell setShowSelection:NO];
+                [cell setTitle:@"Changes only shows upgrades to installed packages so as to minimize spam from packagers. Activate this to see upgrades to this package even when it is not installed."];
                 return cell;
             }
 
@@ -6334,10 +6351,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         [ignoredSwitch_ addTarget:self action:@selector(onIgnored:) forEvents:kUIControlEventMouseUpInside];
 
         subscribedCell_ = [[UIPreferencesControlTableCell alloc] init];
+        [subscribedCell_ setShowSelection:NO];
         [subscribedCell_ setTitle:@"Show All Changes"];
         [subscribedCell_ setControl:subscribedSwitch_];
 
         ignoredCell_ = [[UIPreferencesControlTableCell alloc] init];
+        [ignoredCell_ setShowSelection:NO];
         [ignoredCell_ setTitle:@"Ignore Upgrades"];
         [ignoredCell_ setControl:ignoredSwitch_];
 
@@ -6469,7 +6488,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             initWithTitle:[NSString stringWithFormat:@"%d Essential Upgrade%@", count, (count == 1 ? @"" : @"s")]
             buttons:[NSArray arrayWithObjects:
                 @"Upgrade Essential",
-                @"Upgrade Everything",
+                @"Complete Upgrade",
                 @"Ignore (Temporary)",
             nil]
             defaultButtonIndex:0
@@ -6488,9 +6507,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [overlay_ addSubview:hud];
     [hud show:YES];*/
 
-    _trace();
     [database_ reloadData];
-    _trace();
 
     size_t changes(0);
 
@@ -7257,10 +7274,12 @@ int main(int argc, char *argv[]) { _pooled
     setuid(0);
     setgid(0);
 
+#if 1 /* XXX: this costs 1.4s of startup performance */
     if (unlink("/var/cache/apt/pkgcache.bin") == -1)
         _assert(errno == ENOENT);
     if (unlink("/var/cache/apt/srcpkgcache.bin") == -1)
         _assert(errno == ENOENT);
+#endif
 
     /*Method alloc = class_getClassMethod([NSObject class], @selector(alloc));
     alloc_ = alloc->method_imp;