UITransitionView *transition_;
PackageTable *table_;
UIPreferencesTable *advanced_;
+ UIView *dimmed_;
bool flipped_;
bool reload_;
}
[transition_ release];
[table_ release];
[advanced_ release];
+ [dimmed_ release];
[super dealloc];
}
[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
unsigned tag_;
UIKeyboard *keyboard_;
+
+ InstallView *install_;
+ ChangesView *changes_;
+ ManageView *manage_;
+ SearchView *search_;
}
@end
_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];*/
}
- (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/"]];
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:
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],
[[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];
if (bootstrap_)
[self bootstrap];
else
- [self _setNewsPage];
+ [self _setHomePage];
}
- (void) showKeyboard:(BOOL)show {