- (NSString *) rightButtonTitle {
_assert(package_ != nil);
- return [package_ installed] == nil ? @"Install" : @"Manage";
+ return [package_ installed] == nil ? @"Install" : @"Modify";
}
- (NSString *) title {
return @"Changes";
}
+@end
+/* }}} */
+/* Manage View {{{ */
+@interface ManageView : PackageTable {
+}
+
+- (id) initWithBook:(RVBook *)book database:(Database *)database;
+
+@end
+
+@implementation ManageView
+
+- (id) initWithBook:(RVBook *)book database:(Database *)database {
+ if ((self = [super
+ initWithBook:book
+ database:database
+ title:nil
+ filter:@selector(isInstalledInSection:)
+ with:nil
+ ]) != nil) {
+ } return self;
+}
+
+- (NSString *) title {
+ return @"Installed Packages";
+}
+
+- (NSString *) backButtonTitle {
+ return @"All Packages";
+}
+
@end
/* }}} */
/* Search View {{{ */
[transition_ transition:0 toView:table_];
- CGRect cnfrect = {{3, 36}, {17, 18}};
+ CGRect cnfrect = {{2, 37}, {17, 18}};
CGRect area;
- area.origin.x = cnfrect.size.width + 12;
+ area.origin.x = cnfrect.size.width + 17;
area.origin.y = 30;
area.size.width = [self bounds].size.width - area.origin.x - 18;
area.size.height = [UISearchField defaultHeight];
UIPushButton *configure = [[[UIPushButton alloc] initWithFrame:cnfrect] autorelease];
[configure setShowPressFeedback:YES];
- [configure setImage:[UIImage applicationImageNamed:@"configure.png"]];
+ [configure setImage:[UIImage applicationImageNamed:@"advanced.png"]];
[configure addTarget:self action:@selector(configurePushed) forEvents:1];
accessory_ = [[UIView alloc] initWithFrame:CGRectMake(0, 6, cnfrect.size.width + area.size.width + 6 * 3, area.size.height + 30)];
- (void) buttonBarItemTapped:(id)sender {
unsigned tag = [sender tag];
+ if (tag == tag_) {
+ [book_ resetViewAnimated:YES];
+ return;
+ }
switch (tag) {
case 1:
break;
case 4:
- [self setPage:[[[PackageTable alloc]
- initWithBook:book_
- database:database_
- title:@"Manage"
- filter:@selector(isInstalledInSection:)
- with:nil
- ] autorelease]];
+ [self setPage:[[[ManageView alloc] initWithBook:book_ database:database_] autorelease]];
break;
case 5: