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) {
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_);
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",
}
if (changed) {
- [Packages_ setObject:metadata forKey:id_];
+ [Packages_ setObject:metadata forKey:key];
Changed_ = true;
}
} return self;
}
- (NSDate *) seen {
- NSDictionary *metadata([Packages_ objectForKey:id_]);
+ NSDictionary *metadata([Packages_ objectForKey:[id_ lowercaseString]]);
bool subscribed;
if (NSNumber *isSubscribed = [metadata objectForKey:@"IsSubscribed"])
subscribed = [isSubscribed boolValue];
}
- (void) deliverMessage { _pooled
+ setuid(501);
+ setgid(501);
+
if (![controller_ deliverMessage])
[self performSelectorOnMainThread:@selector(showError) withObject:nil waitUntilDone:NO];
}
} return self;
}
-// XXX: replace with <title/>
-- (NSString *) title {
- return issues_ == nil ? @"Confirm Changes" : @"Cannot Comply";
-}
-
- (NSString *) backButtonTitle {
return @"Confirm";
}
}
- (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 {