]> git.saurik.com Git - cydia.git/commitdiff
Some mild naming and transition nits from the #iphone gang.
authorJay Freeman (saurik) <saurik@saurk.com>
Fri, 25 Apr 2008 10:38:42 +0000 (10:38 +0000)
committerJay Freeman (saurik) <saurik@saurk.com>
Fri, 25 Apr 2008 10:38:42 +0000 (10:38 +0000)
Cydia.app/advanced.png [new file with mode: 0644]
Cydia.mm

diff --git a/Cydia.app/advanced.png b/Cydia.app/advanced.png
new file mode 100644 (file)
index 0000000..419ba52
Binary files /dev/null and b/Cydia.app/advanced.png differ
index 70c5ff664bce00d4c21019c48c81c66a7dd53d16..6baa2792508058303cfa6985f9075d3c63d1465b 100644 (file)
--- 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: