diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-10-14 09:14:40 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:08:50 +0000 |
commit | 86316a91d38e6a538c28178636bc59f287a4e3a3 (patch) | |
tree | dd201db95e6d6dd90a6b114981a594936cff8699 /Cydia.mm | |
parent | a4b0ec524a1102ecc7ffa47e0ba5971e750162cc (diff) |
Some last finalization on mailto:.
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -548,7 +548,7 @@ NSString *SizeString(double size) { static const char *powers_[] = {"B", "kB", "MB", "GB"}; - return [NSString stringWithFormat:@"%s%.1f%s", (negative ? "-" : ""), size, powers_[power]]; + return [NSString stringWithFormat:@"%s%.1f %s", (negative ? "-" : ""), size, powers_[power]]; } NSString *StripVersion(NSString *version) { @@ -1208,7 +1208,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { file_ = pkgCache::VerFileIterator(cache, cache.VerFileP); } - id_ = [[[NSString stringWithUTF8String:iterator_.Name()] lowercaseString] retain]; + id_ = [[NSString stringWithUTF8String:iterator_.Name()] retain]; if (!file_.end()) { pkgRecords::Parser *parser = &[database_ records]->Lookup(file_); @@ -1256,7 +1256,9 @@ NSString *Scour(const char *field, const char *begin, const char *end) { NSString *solid(latest == nil ? installed : latest); bool changed(false); - NSMutableDictionary *metadata = [Packages_ objectForKey:id_]; + NSString *key([id_ lowercaseString]); + + NSMutableDictionary *metadata = [Packages_ objectForKey:key]; if (metadata == nil) { metadata = [NSMutableDictionary dictionaryWithObjectsAndKeys: now_, @"FirstSeen", @@ -1289,7 +1291,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { } if (changed) { - [Packages_ setObject:metadata forKey:id_]; + [Packages_ setObject:metadata forKey:key]; Changed_ = true; } } return self; @@ -1360,7 +1362,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { } - (NSDate *) seen { - NSDictionary *metadata([Packages_ objectForKey:id_]); + NSDictionary *metadata([Packages_ objectForKey:[id_ lowercaseString]]); bool subscribed; if (NSNumber *isSubscribed = [metadata objectForKey:@"IsSubscribed"]) subscribed = [isSubscribed boolValue]; @@ -2447,6 +2449,9 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:@"Error" bu } - (void) deliverMessage { _pooled + setuid(501); + setgid(501); + if (![controller_ deliverMessage]) [self performSelectorOnMainThread:@selector(showError) withObject:nil waitUntilDone:NO]; } @@ -2645,11 +2650,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } return self; } -// XXX: replace with <title/> -- (NSString *) title { - return issues_ == nil ? @"Confirm Changes" : @"Cannot Comply"; -} - - (NSString *) backButtonTitle { return @"Confirm"; } @@ -6655,7 +6655,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) openMailToURL:(NSURL *)url { +// XXX: this makes me sad +#if 0 [[[MailToView alloc] initWithView:underlay_ delegate:self url:url] autorelease]; +#else + [UIApp openURL:url]; +#endif } - (RVPage *) pageForPackage:(NSString *)name { |