- (void) deselect;
- (void) reloadData:(BOOL)reset;
+- (NSMutableArray *) packages;
- (NSString *) title;
- (void) perform:(Package *)package;
- (void) addPackage:(Package *)package;
}
}
+- (NSMutableArray *) packages {
+ return packages_;
+}
+
- (NSString *) title {
return nil;
}
[upgrade_ reloadData:reset];
[uninstall_ reloadData:reset];
[sources_ reloadData];
+
+ if (size_t count = [[upgrade_ packages] count]) {
+ NSString *badge([[NSNumber numberWithInt:count] stringValue]);
+ [buttonbar_ setBadgeValue:badge forButton:3];
+ [buttonbar_ setBadgeAnimated:YES forButton:3];
+ [self setApplicationBadge:badge];
+ } else {
+ [buttonbar_ setBadgeValue:nil forButton:3];
+ [buttonbar_ setBadgeAnimated:NO forButton:3];
+ [self removeApplicationBadge];
+ }
}
- (void) perform {