From: Jay Freeman (saurik) Date: Fri, 25 Apr 2008 10:38:42 +0000 (+0000) Subject: Some mild naming and transition nits from the #iphone gang. X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/97959670e2d240bab0e7c54b85b108ff5b2ff16c?hp=113c9b626b240d2b7635b476fd64713bfe3335f0 Some mild naming and transition nits from the #iphone gang. --- diff --git a/Cydia.app/advanced.png b/Cydia.app/advanced.png new file mode 100644 index 00000000..419ba521 Binary files /dev/null and b/Cydia.app/advanced.png differ diff --git a/Cydia.mm b/Cydia.mm index 70c5ff66..6baa2792 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -2812,7 +2812,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString - (NSString *) rightButtonTitle { _assert(package_ != nil); - return [package_ installed] == nil ? @"Install" : @"Manage"; + return [package_ installed] == nil ? @"Install" : @"Modify"; } - (NSString *) title { @@ -3669,6 +3669,37 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString 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 {{{ */ @@ -3761,10 +3792,10 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString [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]; @@ -3789,7 +3820,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString 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)]; @@ -4202,6 +4233,10 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString - (void) buttonBarItemTapped:(id)sender { unsigned tag = [sender tag]; + if (tag == tag_) { + [book_ resetViewAnimated:YES]; + return; + } switch (tag) { case 1: @@ -4217,13 +4252,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString 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: