]> git.saurik.com Git - cydia.git/commitdiff
Renamed News to Home and started pre-caching tabs for perceived performance.
authorJay Freeman (saurik) <saurik@saurk.com>
Tue, 6 May 2008 21:57:44 +0000 (21:57 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:00 +0000 (07:08 +0000)
Cydia.app/home-dn.png [new file with mode: 0644]
Cydia.app/home-up.png [new file with mode: 0644]
Cydia.app/news-dn.png [deleted file]
Cydia.app/news-up.png [deleted file]
Cydia.mm

diff --git a/Cydia.app/home-dn.png b/Cydia.app/home-dn.png
new file mode 100644 (file)
index 0000000..c02c120
Binary files /dev/null and b/Cydia.app/home-dn.png differ
diff --git a/Cydia.app/home-up.png b/Cydia.app/home-up.png
new file mode 100644 (file)
index 0000000..0611697
Binary files /dev/null and b/Cydia.app/home-up.png differ
diff --git a/Cydia.app/news-dn.png b/Cydia.app/news-dn.png
deleted file mode 100644 (file)
index c02c120..0000000
Binary files a/Cydia.app/news-dn.png and /dev/null differ
diff --git a/Cydia.app/news-up.png b/Cydia.app/news-up.png
deleted file mode 100644 (file)
index 0611697..0000000
Binary files a/Cydia.app/news-up.png and /dev/null differ
index c3a9e0b2270f46326b02fa325dfa5707b78f8cf8..81a3e7b73ae2974bbaf327e37f0739d81b7c3bf1 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -3463,6 +3463,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
     UITransitionView *transition_;
     PackageTable *table_;
     UIPreferencesTable *advanced_;
+    UIView *dimmed_;
     bool flipped_;
     bool reload_;
 }
@@ -3485,6 +3486,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
     [transition_ release];
     [table_ release];
     [advanced_ release];
+    [dimmed_ release];
     [super dealloc];
 }
 
@@ -3560,6 +3562,10 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
         [advanced_ setDataSource:self];
         [advanced_ reloadData];
 
+        dimmed_ = [[UIView alloc] initWithFrame:pageBounds];
+        CGColor dimmed(space_, 0, 0, 0, 0.5);
+        [dimmed_ setBackgroundColor:dimmed];
+
         table_ = [[PackageTable alloc]
             initWithBook:book
             database:database
@@ -3836,6 +3842,11 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
     unsigned tag_;
 
     UIKeyboard *keyboard_;
+
+    InstallView *install_;
+    ChangesView *changes_;
+    ManageView *manage_;
+    SearchView *search_;
 }
 
 @end
@@ -3881,6 +3892,16 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
 
     _assert([Metadata_ writeToFile:@"/var/lib/cydia/metadata.plist" atomically:YES] == YES);
 
+    /* XXX: this is just stupid */
+    if (tag_ != 2)
+        [install_ reloadData];
+    if (tag_ != 3)
+        [changes_ reloadData];
+    if (tag_ != 4)
+        [manage_ reloadData];
+    if (tag_ != 5)
+        [search_ reloadData];
+
     [book_ reloadData];
     /*[hud show:NO];
     [hud removeFromSuperview];*/
@@ -4008,11 +4029,12 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
 }
 
 - (void) setPage:(RVPage *)page {
+    [page resetViewAnimated:NO];
     [page setDelegate:self];
     [book_ setPage:page];
 }
 
-- (RVPage *) _setNewsPage {
+- (RVPage *) _setHomePage {
     BrowserView *browser = [[[BrowserView alloc] initWithBook:book_ database:database_] autorelease];
     [self setPage:browser];
     [browser loadURL:[NSURL URLWithString:@"http://cydia.saurik.com/"]];
@@ -4028,23 +4050,23 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
 
     switch (tag) {
         case 1:
-            [self _setNewsPage];
+            [self _setHomePage];
         break;
 
         case 2:
-            [self setPage:[[[InstallView alloc] initWithBook:book_ database:database_] autorelease]];
+            [self setPage:install_];
         break;
 
         case 3:
-            [self setPage:[[[ChangesView alloc] initWithBook:book_ database:database_] autorelease]];
+            [self setPage:changes_];
         break;
 
         case 4:
-            [self setPage:[[[ManageView alloc] initWithBook:book_ database:database_] autorelease]];
+            [self setPage:manage_];
         break;
 
         case 5:
-            [self setPage:[[[SearchView alloc] initWithBook:book_ database:database_] autorelease]];
+            [self setPage:search_];
         break;
 
         default:
@@ -4103,11 +4125,11 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
     NSArray *buttonitems = [NSArray arrayWithObjects:
         [NSDictionary dictionaryWithObjectsAndKeys:
             @"buttonBarItemTapped:", kUIButtonBarButtonAction,
-            @"news-up.png", kUIButtonBarButtonInfo,
-            @"news-dn.png", kUIButtonBarButtonSelectedInfo,
+            @"home-up.png", kUIButtonBarButtonInfo,
+            @"home-dn.png", kUIButtonBarButtonSelectedInfo,
             [NSNumber numberWithInt:1], kUIButtonBarButtonTag,
             self, kUIButtonBarButtonTarget,
-            @"News", kUIButtonBarButtonTitle,
+            @"Home", kUIButtonBarButtonTitle,
             @"0", kUIButtonBarButtonType,
         nil],
 
@@ -4184,6 +4206,11 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
     [[UIKeyboardImpl sharedInstance] setSoundsEnabled:(Sounds_Keyboard_ ? YES : NO)];
     [overlay_ addSubview:keyboard_];
 
+    install_ = [[InstallView alloc] initWithBook:book_ database:database_];
+    changes_ = [[ChangesView alloc] initWithBook:book_ database:database_];
+    manage_ = [[ManageView alloc] initWithBook:book_ database:database_];
+    search_ = [[SearchView alloc] initWithBook:book_ database:database_];
+
     [self reloadData];
     [book_ update];
 
@@ -4192,7 +4219,7 @@ void AddTextView(NSMutableDictionary *fields, NSMutableArray *packages, NSString
     if (bootstrap_)
         [self bootstrap];
     else
-        [self _setNewsPage];
+        [self _setHomePage];
 }
 
 - (void) showKeyboard:(BOOL)show {