From aeed65a68c965050ac58c167396b973d44054f63 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 30 Jul 2010 10:58:12 +0000 Subject: Further iPhone 4 resolution bumps. --- Cydia.app/changes-dn.png | Bin 2211 -> 0 bytes Cydia.app/changes-up.png | Bin 1724 -> 0 bytes Cydia.app/changes.png | Bin 0 -> 1724 bytes Cydia.app/changes@2x.png | Bin 0 -> 3150 bytes Cydia.app/chevron@2x.png | Bin 0 -> 415 bytes Cydia.app/folder@2x.png | Bin 0 -> 5159 bytes Cydia.app/home-Selected.png | Bin 0 -> 2181 bytes Cydia.app/home-Selected@2x.png | Bin 0 -> 6563 bytes Cydia.app/home-dn.png | Bin 2181 -> 0 bytes Cydia.app/home-up.png | Bin 1847 -> 0 bytes Cydia.app/home.png | Bin 0 -> 1847 bytes Cydia.app/home@2x.png | Bin 0 -> 5127 bytes Cydia.app/install-dn.png | Bin 1480 -> 0 bytes Cydia.app/install-up.png | Bin 1245 -> 0 bytes Cydia.app/install.png | Bin 0 -> 1245 bytes Cydia.app/install@2x.png | Bin 0 -> 696 bytes Cydia.app/manage-dn.png | Bin 1687 -> 0 bytes Cydia.app/manage-up.png | Bin 1326 -> 0 bytes Cydia.app/manage.png | Bin 0 -> 1326 bytes Cydia.app/manage@2x.png | Bin 0 -> 2080 bytes Cydia.app/menes/chevron@2x.png | Bin 0 -> 415 bytes Cydia.app/menes/style.css | 8 +++ Cydia.app/search-dn.png | Bin 1707 -> 0 bytes Cydia.app/search-up.png | Bin 1333 -> 0 bytes Cydia.app/search.png | Bin 0 -> 1333 bytes Cydia.app/search@2x.png | Bin 0 -> 1143 bytes Cydia.mm | 120 +++++++++++++---------------------------- control | 2 +- 28 files changed, 47 insertions(+), 83 deletions(-) delete mode 100644 Cydia.app/changes-dn.png delete mode 100644 Cydia.app/changes-up.png create mode 100644 Cydia.app/changes.png create mode 100644 Cydia.app/changes@2x.png create mode 100644 Cydia.app/chevron@2x.png create mode 100644 Cydia.app/folder@2x.png create mode 100644 Cydia.app/home-Selected.png create mode 100644 Cydia.app/home-Selected@2x.png delete mode 100644 Cydia.app/home-dn.png delete mode 100644 Cydia.app/home-up.png create mode 100644 Cydia.app/home.png create mode 100644 Cydia.app/home@2x.png delete mode 100644 Cydia.app/install-dn.png delete mode 100644 Cydia.app/install-up.png create mode 100644 Cydia.app/install.png create mode 100644 Cydia.app/install@2x.png delete mode 100644 Cydia.app/manage-dn.png delete mode 100644 Cydia.app/manage-up.png create mode 100644 Cydia.app/manage.png create mode 100644 Cydia.app/manage@2x.png create mode 100644 Cydia.app/menes/chevron@2x.png delete mode 100644 Cydia.app/search-dn.png delete mode 100644 Cydia.app/search-up.png create mode 100644 Cydia.app/search.png create mode 100644 Cydia.app/search@2x.png diff --git a/Cydia.app/changes-dn.png b/Cydia.app/changes-dn.png deleted file mode 100644 index cfd31f1..0000000 Binary files a/Cydia.app/changes-dn.png and /dev/null differ diff --git a/Cydia.app/changes-up.png b/Cydia.app/changes-up.png deleted file mode 100644 index 654208f..0000000 Binary files a/Cydia.app/changes-up.png and /dev/null differ diff --git a/Cydia.app/changes.png b/Cydia.app/changes.png new file mode 100644 index 0000000..654208f Binary files /dev/null and b/Cydia.app/changes.png differ diff --git a/Cydia.app/changes@2x.png b/Cydia.app/changes@2x.png new file mode 100644 index 0000000..aa6a29a Binary files /dev/null and b/Cydia.app/changes@2x.png differ diff --git a/Cydia.app/chevron@2x.png b/Cydia.app/chevron@2x.png new file mode 100644 index 0000000..9905c17 Binary files /dev/null and b/Cydia.app/chevron@2x.png differ diff --git a/Cydia.app/folder@2x.png b/Cydia.app/folder@2x.png new file mode 100644 index 0000000..af3009c Binary files /dev/null and b/Cydia.app/folder@2x.png differ diff --git a/Cydia.app/home-Selected.png b/Cydia.app/home-Selected.png new file mode 100644 index 0000000..c02c120 Binary files /dev/null and b/Cydia.app/home-Selected.png differ diff --git a/Cydia.app/home-Selected@2x.png b/Cydia.app/home-Selected@2x.png new file mode 100644 index 0000000..748be33 Binary files /dev/null and b/Cydia.app/home-Selected@2x.png differ diff --git a/Cydia.app/home-dn.png b/Cydia.app/home-dn.png deleted file mode 100644 index c02c120..0000000 Binary files a/Cydia.app/home-dn.png and /dev/null differ diff --git a/Cydia.app/home-up.png b/Cydia.app/home-up.png deleted file mode 100644 index 0611697..0000000 Binary files a/Cydia.app/home-up.png and /dev/null differ diff --git a/Cydia.app/home.png b/Cydia.app/home.png new file mode 100644 index 0000000..0611697 Binary files /dev/null and b/Cydia.app/home.png differ diff --git a/Cydia.app/home@2x.png b/Cydia.app/home@2x.png new file mode 100644 index 0000000..72b7297 Binary files /dev/null and b/Cydia.app/home@2x.png differ diff --git a/Cydia.app/install-dn.png b/Cydia.app/install-dn.png deleted file mode 100644 index c8ab0f4..0000000 Binary files a/Cydia.app/install-dn.png and /dev/null differ diff --git a/Cydia.app/install-up.png b/Cydia.app/install-up.png deleted file mode 100644 index 9e30898..0000000 Binary files a/Cydia.app/install-up.png and /dev/null differ diff --git a/Cydia.app/install.png b/Cydia.app/install.png new file mode 100644 index 0000000..9e30898 Binary files /dev/null and b/Cydia.app/install.png differ diff --git a/Cydia.app/install@2x.png b/Cydia.app/install@2x.png new file mode 100644 index 0000000..dfb8212 Binary files /dev/null and b/Cydia.app/install@2x.png differ diff --git a/Cydia.app/manage-dn.png b/Cydia.app/manage-dn.png deleted file mode 100644 index 727d067..0000000 Binary files a/Cydia.app/manage-dn.png and /dev/null differ diff --git a/Cydia.app/manage-up.png b/Cydia.app/manage-up.png deleted file mode 100644 index 9513a7c..0000000 Binary files a/Cydia.app/manage-up.png and /dev/null differ diff --git a/Cydia.app/manage.png b/Cydia.app/manage.png new file mode 100644 index 0000000..9513a7c Binary files /dev/null and b/Cydia.app/manage.png differ diff --git a/Cydia.app/manage@2x.png b/Cydia.app/manage@2x.png new file mode 100644 index 0000000..cfb8c13 Binary files /dev/null and b/Cydia.app/manage@2x.png differ diff --git a/Cydia.app/menes/chevron@2x.png b/Cydia.app/menes/chevron@2x.png new file mode 100644 index 0000000..9905c17 Binary files /dev/null and b/Cydia.app/menes/chevron@2x.png differ diff --git a/Cydia.app/menes/style.css b/Cydia.app/menes/style.css index 14877be..677a2fc 100644 --- a/Cydia.app/menes/style.css +++ b/Cydia.app/menes/style.css @@ -467,6 +467,14 @@ fieldset > div > div > select { background-image: url(chevron.png); } +@media screen and (-webkit-min-device-pixel-ratio: 2) { +fieldset > a[href]:not([type="ad"]), +fieldset > div > select, +fieldset > div > div > select { + background-image: url(chevron@2x.png); + background-size: 10px 13px; +} } + /* Horizontal */ list > fieldset > a[href] { diff --git a/Cydia.app/search-dn.png b/Cydia.app/search-dn.png deleted file mode 100644 index 56ce631..0000000 Binary files a/Cydia.app/search-dn.png and /dev/null differ diff --git a/Cydia.app/search-up.png b/Cydia.app/search-up.png deleted file mode 100644 index 4083f1b..0000000 Binary files a/Cydia.app/search-up.png and /dev/null differ diff --git a/Cydia.app/search.png b/Cydia.app/search.png new file mode 100644 index 0000000..4083f1b Binary files /dev/null and b/Cydia.app/search.png differ diff --git a/Cydia.app/search@2x.png b/Cydia.app/search@2x.png new file mode 100644 index 0000000..74d6381 Binary files /dev/null and b/Cydia.app/search@2x.png differ diff --git a/Cydia.mm b/Cydia.mm index f4b4a8e..8d93381 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -380,7 +380,7 @@ static const CFStringCompareFlags LaxCompareFlags_ = kCFCompareCaseInsensitive | #define lprintf(args...) fprintf(stderr, args) -#define ForRelease 1 +#define ForRelease 0 #define TraceLogging (1 && !ForRelease) #define HistogramInsertionSort (0 && !ForRelease) #define ProfileTimes (0 && !ForRelease) @@ -392,7 +392,7 @@ static const CFStringCompareFlags LaxCompareFlags_ = kCFCompareCaseInsensitive | #define IgnoreInstall (0 && !ForRelease) #define RecycleWebViews 0 #define RecyclePackageViews (1 && ForRelease) -#define AlwaysReload (0 && !ForRelease) +#define AlwaysReload (1 && !ForRelease) #if !TraceLogging #undef _trace @@ -3935,7 +3935,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if ((self = [super initWithBook:book forWidth:width ofClass:[CydiaBrowserView class]]) != nil) { cydia_ = [[CydiaObject alloc] initWithDelegate:indirect_]; - WebView *webview([webview_ webView]); + WebView *webview([document_ webView]); Package *package([[Database sharedInstance] packageWithName:@"cydia"]); @@ -5318,10 +5318,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [buttons_ addObject:UCLocalize("REMOVE")]; if (special_ != NULL) { - CGRect frame([webview_ frame]); + CGRect frame([document_ frame]); frame.size.width = 320; frame.size.height = 0; - [webview_ setFrame:frame]; + [document_ setFrame:frame]; if ([scroller_ respondsToSelector:@selector(scrollPointVisibleAtTopLeft:)]) [scroller_ scrollPointVisibleAtTopLeft:CGPointZero]; @@ -5329,7 +5329,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [scroller_ scrollRectToVisible:CGRectZero animated:NO]; WebThreadLock(); - [[[webview_ webView] windowScriptObject] setValue:package_ forKey:@"package"]; + [[[document_ webView] windowScriptObject] setValue:package_ forKey:@"package"]; [self setButtonTitle:nil withStyle:nil toFunction:nil]; @@ -7619,7 +7619,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { UIView *underlay_; UIView *overlay_; CYBook *book_; - UIToolbar *toolbar_; + + NSArray *items_; + UITabBar *toolbar_; RVBook *confirm_; @@ -7629,7 +7631,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { Database *database_; ProgressView *progress_; - unsigned tag_; + int tag_; UIKeyboard *keyboard_; UIProgressHUD *hud_; @@ -7723,11 +7725,11 @@ static _finline void _setHomePage(Cydia *self) { [self _saveConfig]; /* XXX: this is just stupid */ - if (tag_ != 2 && sections_ != nil) + if (tag_ != 1 && sections_ != nil) [sections_ reloadData]; - if (tag_ != 3 && changes_ != nil) + if (tag_ != 2 && changes_ != nil) [changes_ reloadData]; - if (tag_ != 5 && search_ != nil) + if (tag_ != 4 && search_ != nil) [search_ reloadData]; [book_ reloadData]; @@ -8005,21 +8007,21 @@ static _finline void _setHomePage(Cydia *self) { return search_; } -- (void) buttonBarItemTapped:(id)sender { - unsigned tag = [sender tag]; +- (void) tabBar:(UITabBar *)sender didSelectItem:(UITabBarItem *)item { + int tag = [item tag]; if (tag == tag_) { [book_ resetViewAnimated:YES]; return; - } else if (tag_ == 2) + } else if (tag_ == 1) [[self sectionsView] resetView]; switch (tag) { - case 1: _setHomePage(self); break; + case 0: _setHomePage(self); break; - case 2: [self setPage:[self sectionsView]]; break; - case 3: [self setPage:[self changesView]]; break; - case 4: [self setPage:[self manageView]]; break; - case 5: [self setPage:[self searchView]]; break; + case 1: [self setPage:[self sectionsView]]; break; + case 2: [self setPage:[self changesView]]; break; + case 3: [self setPage:[self manageView]]; break; + case 4: [self setPage:[self searchView]]; break; _nodefault } @@ -8244,7 +8246,7 @@ static _finline void _setHomePage(Cydia *self) { - (RVPage *) pageForURL:(NSURL *)url hasTag:(int *)tag { if (tag != NULL) - tag = 0; + *tag = -1; NSString *href([url absoluteString]); if ([href hasPrefix:@"apptapp://package/"]) @@ -8296,8 +8298,8 @@ static _finline void _setHomePage(Cydia *self) { int tag; if (RVPage *page = [self pageForURL:url hasTag:&tag]) { [self setPage:page]; - [toolbar_ showSelectionForButton:tag]; tag_ = tag; + [toolbar_ setSelectedItem:(tag_ == -1 ? nil : [items_ objectAtIndex:tag_])]; } } @@ -8312,7 +8314,7 @@ static _finline void _setHomePage(Cydia *self) { Font18Bold_ = [[UIFont boldSystemFontOfSize:18] retain]; Font22Bold_ = [[UIFont boldSystemFontOfSize:22] retain]; - tag_ = 1; + tag_ = 0; essential_ = [[NSMutableArray alloc] initWithCapacity:4]; broken_ = [[NSMutableArray alloc] initWithCapacity:4]; @@ -8391,75 +8393,29 @@ static _finline void _setHomePage(Cydia *self) { [book_ setDelegate:self]; - NSArray *buttonitems = [NSArray arrayWithObjects: - [NSDictionary dictionaryWithObjectsAndKeys: - @"buttonBarItemTapped:", kUIButtonBarButtonAction, - @"home-up.png", kUIButtonBarButtonInfo, - @"home-dn.png", kUIButtonBarButtonSelectedInfo, - [NSNumber numberWithInt:1], kUIButtonBarButtonTag, - self, kUIButtonBarButtonTarget, - @"Cydia", kUIButtonBarButtonTitle, - @"0", kUIButtonBarButtonType, - nil], - - [NSDictionary dictionaryWithObjectsAndKeys: - @"buttonBarItemTapped:", kUIButtonBarButtonAction, - @"install-up.png", kUIButtonBarButtonInfo, - @"install-dn.png", kUIButtonBarButtonSelectedInfo, - [NSNumber numberWithInt:2], kUIButtonBarButtonTag, - self, kUIButtonBarButtonTarget, - UCLocalize("SECTIONS"), kUIButtonBarButtonTitle, - @"0", kUIButtonBarButtonType, - nil], - - [NSDictionary dictionaryWithObjectsAndKeys: - @"buttonBarItemTapped:", kUIButtonBarButtonAction, - @"changes-up.png", kUIButtonBarButtonInfo, - @"changes-dn.png", kUIButtonBarButtonSelectedInfo, - [NSNumber numberWithInt:3], kUIButtonBarButtonTag, - self, kUIButtonBarButtonTarget, - UCLocalize("CHANGES"), kUIButtonBarButtonTitle, - @"0", kUIButtonBarButtonType, - nil], - - [NSDictionary dictionaryWithObjectsAndKeys: - @"buttonBarItemTapped:", kUIButtonBarButtonAction, - @"manage-up.png", kUIButtonBarButtonInfo, - @"manage-dn.png", kUIButtonBarButtonSelectedInfo, - [NSNumber numberWithInt:4], kUIButtonBarButtonTag, - self, kUIButtonBarButtonTarget, - UCLocalize("MANAGE"), kUIButtonBarButtonTitle, - @"0", kUIButtonBarButtonType, - nil], - - [NSDictionary dictionaryWithObjectsAndKeys: - @"buttonBarItemTapped:", kUIButtonBarButtonAction, - @"search-up.png", kUIButtonBarButtonInfo, - @"search-dn.png", kUIButtonBarButtonSelectedInfo, - [NSNumber numberWithInt:5], kUIButtonBarButtonTag, - self, kUIButtonBarButtonTarget, - UCLocalize("SEARCH"), kUIButtonBarButtonTitle, - @"0", kUIButtonBarButtonType, - nil], - nil]; + items_ = [[NSArray arrayWithObjects: + [[[UITabBarItem alloc] initWithTitle:@"Cydia" image:[UIImage applicationImageNamed:@"home.png"] tag:0] autorelease], + [[[UITabBarItem alloc] initWithTitle:UCLocalize("SECTIONS") image:[UIImage applicationImageNamed:@"install.png"] tag:1] autorelease], + [[[UITabBarItem alloc] initWithTitle:UCLocalize("CHANGES") image:[UIImage applicationImageNamed:@"changes.png"] tag:2] autorelease], + [[[UITabBarItem alloc] initWithTitle:UCLocalize("MANAGE") image:[UIImage applicationImageNamed:@"manage.png"] tag:3] autorelease], + [[[UITabBarItem alloc] initWithTitle:UCLocalize("SEARCH") image:[UIImage applicationImageNamed:@"search.png"] tag:4] autorelease], + nil] retain]; - toolbar_ = [[UIToolbar alloc] - initInView:overlay_ - withFrame:CGRectMake( + toolbar_ = [[UITabBar alloc] + initWithFrame:CGRectMake( 0, screenrect.size.height - ButtonBarHeight_, screenrect.size.width, ButtonBarHeight_ ) - withItemList:buttonitems ]; + [toolbar_ setItems:items_]; + [toolbar_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin)]; [overlay_ addSubview:toolbar_]; [toolbar_ setDelegate:self]; - [toolbar_ setBarStyle:1]; - [toolbar_ setButtonBarTrackingMode:2]; - int buttons[5] = {1, 2, 3, 4, 5}; + /*int buttons[5] = {1, 2, 3, 4, 5}; [toolbar_ registerButtonGroup:0 withButtons:buttons withCount:5]; [toolbar_ showButtonGroup:0 withDuration:0]; @@ -8472,9 +8428,9 @@ static _finline void _setHomePage(Cydia *self) { )]; [button setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin]; - } + }*/ - [toolbar_ showSelectionForButton:1]; + [toolbar_ setSelectedItem:[items_ objectAtIndex:0]]; [UIKeyboard initImplementationNow]; /*CGSize keysize = [UIKeyboard defaultSize]; diff --git a/control b/control index 26c200a..5843b4b 100644 --- a/control +++ b/control @@ -3,7 +3,7 @@ Priority: required Section: Packaging Maintainer: Jay Freeman (saurik) Architecture: iphoneos-arm -Version: 1.0.3189-1 +Version: 1.0.3215-1 Replaces: com.sosiphone.addcydia Depends: apr-lib, apt7-lib, apt7-key, darwintools, pcre, sed, shell-cmds, system-cmds, uikittools (>= 1.0.3198) Pre-Depends: dpkg (>= 1.14.25-8) -- cgit v1.2.3