summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-03-07 08:24:22 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:09:50 +0000
commit3bd1c2a2a065f381047db7201797be94f19e4c6c (patch)
tree11bc5a999092359d90609697fd4e04663e70cfa8
parente124f5222a28c2a3e2081155cbaa02017b763b93 (diff)
Checkpoint before final completion.
-rw-r--r--Cydia.app/Default.pngbin2307 -> 789 bytes
-rw-r--r--Cydia.app/Sections.plist6
-rw-r--r--Cydia.app/Sections/Keyboards.png (renamed from Cydia.app/Sections/Keyboard Extensions.png)bin6726 -> 6726 bytes
-rw-r--r--Cydia.app/menes/style.css48
-rw-r--r--Cydia.app/package.html31
-rw-r--r--Cydia.app/package.js24
-rw-r--r--Cydia.mm80
-rw-r--r--control2
8 files changed, 136 insertions, 55 deletions
diff --git a/Cydia.app/Default.png b/Cydia.app/Default.png
index 3c7762c..ca46fda 100644
--- a/Cydia.app/Default.png
+++ b/Cydia.app/Default.png
Binary files differ
diff --git a/Cydia.app/Sections.plist b/Cydia.app/Sections.plist
index 5b03a42..f5e8797 100644
--- a/Cydia.app/Sections.plist
+++ b/Cydia.app/Sections.plist
@@ -39,12 +39,6 @@
<string>Carrier_Bundles</string>
</dict>
- <key>Keyboard_Extension</key>
- <dict>
- <key>Rename</key>
- <string>Keyboard_Extensions</string>
- </dict>
-
<key>Messageing</key>
<dict>
<key>Rename</key>
diff --git a/Cydia.app/Sections/Keyboard Extensions.png b/Cydia.app/Sections/Keyboards.png
index 6b3df89..6b3df89 100644
--- a/Cydia.app/Sections/Keyboard Extensions.png
+++ b/Cydia.app/Sections/Keyboards.png
Binary files differ
diff --git a/Cydia.app/menes/style.css b/Cydia.app/menes/style.css
index 174312f..61a53df 100644
--- a/Cydia.app/menes/style.css
+++ b/Cydia.app/menes/style.css
@@ -181,9 +181,17 @@ dialog > toolbar > a.forward-button {
/* }}} */
panel > block {
- background-color: #c7ced5;
+ /*background-color: #ccd1d5;*/
+ /*background-color: white;*/
+ /*background-color: #c7ced5;*/
+ background-color: transparent;
+ //background-color: #ffffff;
border-bottom: 1px solid #999999;
border-top: 1px solid #999999;
+ border-left: 1px dotted #999999;
+ border-right: 1px dotted #999999;
+ -webkit-border-radius: 9px;
+ //border: 1px solid #999999;
display: block;
font-size: 16px;
margin: 9px 10px;
@@ -267,11 +275,6 @@ fieldset > textarea {
padding: 12px 14px 10px 14px;
}
-fieldset > a:not([type="ad"]):first-child,
-fieldset > div:first-child {
- padding-top: 13px;
-}
-
/*fieldset > a:not([type="ad"]):last-child,
fieldset > div:last-child {
padding-bottom: 10px;
@@ -312,7 +315,7 @@ panel > fieldset > a[type="comment"] > div:first-of-type {
}
panel > fieldset > a[type="profile"] > div:first-of-type,
-panel > fieldset > a[type="thumb"] > div:first-of-type {
+panel > fieldset:not(.header) > a[type="thumb"] > div:first-of-type {
border: 1px solid #999999;
}
@@ -352,7 +355,13 @@ fieldset > a[type="comment"] > div:first-of-type {
width: 44px;
}
+fieldset > a[type="header"] > div:first-of-type {
+ height: 64px;
+ width: 64px;
+}
+
fieldset > a[type="profile"] > div:first-of-type {
+ -webkit-background-size: 50px;
height: 50px;
width: 50px;
}
@@ -363,6 +372,7 @@ fieldset > a[type="thumb"] > div:first-of-type {
}
fieldset > a[type="comment"] > div:first-of-type,
+fieldset > a[type="header"] > div:first-of-type,
fieldset > a[type="profile"] > div:first-of-type,
fieldset > a[type="thumb"] > div:first-of-type {
background-repeat: no-repeat;
@@ -370,7 +380,7 @@ fieldset > a[type="thumb"] > div:first-of-type {
display: inline-block;
/* XXX: small differences due to font bugs */
/* XXX: 1px difference due to border stupidity */
- margin: -14px 7px -11px -15px;
+ margin: -13px 7px -11px -15px;
}
fieldset > a > img.icon,
@@ -517,11 +527,12 @@ fieldset > a:not([type]) > div {
width: 250px;
}
+fieldset > a:not([href]) > img.icon + div,
fieldset > div > img.icon + div {
width: 244px;
}
-fieldset > a > img.icon + div {
+fieldset > a[href] > img.icon + div {
width: 221px;
}
@@ -560,7 +571,7 @@ fieldset > a[type="thumb"] > div:nth-of-type(2) {
}
fieldset > a[type="profile"] > div:nth-of-type(2) {
- margin: -6px 0 -5px 0;
+ margin: -5px 0;
}
fieldset > a[type="profile"] > div:nth-of-type(2),
@@ -721,7 +732,11 @@ panel.centered > label {
}
panel > iframe {
- margin: -8px 0;
+ margin: -9px 0;
+}
+
+panel > iframe + iframe {
+ margin-top: 0;
}
/* Rating Stars {{{ */
@@ -776,3 +791,14 @@ panel > iframe {
position: absolute;
}
/* }}} */
+
+panel > fieldset.header {
+ background-color: transparent;
+ border: none;
+ margin: -5px 0 -11px 0;
+}
+
+panel > fieldset.header > a > div > label {
+ color: #4d4d70;
+ text-shadow: rgba(255, 255, 255, 0.75) 1px 1px 0;
+}
diff --git a/Cydia.app/package.html b/Cydia.app/package.html
index dbf5586..4dc34a8 100644
--- a/Cydia.app/package.html
+++ b/Cydia.app/package.html
@@ -61,18 +61,6 @@
top: -5px;
}
- #depiction {
- margin: -8px 0;
- overflow: hidden;
- width: 320px;
- }
-
- #notice {
- margin: -8px 0 -9px 0;
- overflow: hidden;
- width: 320px;
- }
-
#remove > a {
color: #335588;
text-decoration: none;
@@ -260,13 +248,23 @@
</div></div>
</fieldset>
-<div id="notice" class="notice"><iframe
+<!--iframe
+ class="notice"
id="notice-src"
frameborder="0"
width="320"
height="0"
target="_top"
-></iframe></div>
+></iframe-->
+
+<!--iframe
+ class="activation"
+ id="activation-src"
+ frameborder="0"
+ width="320"
+ height="0"
+ target="_top"
+></iframe-->
<!--div id="remove" class="depiction">
<a href="javascript:remove()">Remove Custom Depiction</a>
@@ -274,14 +272,15 @@
<hr id="upper-bar" class="depiction"/-->
-<div id="depiction" class="depiction"><iframe
+<iframe
+ class="depiction"
id="depiction-src"
frameborder="0"
width="320"
height="0"
target="_top"
onload_="loaded()"
-></iframe></div>
+></iframe>
<!--hr id="lower-bar" class="depiction"/-->
diff --git a/Cydia.app/package.js b/Cydia.app/package.js
index c3b361c..200be8b 100644
--- a/Cydia.app/package.js
+++ b/Cydia.app/package.js
@@ -63,7 +63,7 @@ $(function () {
$("#name").html(name);
space("#latest", package.latest, 96);
- $.xhr((api + 'package_/' + idc), 'GET', {}, null, {
+ $.xhr(cache(api + 'package/' + idc), 'GET', {}, null, {
success: function (value) {
value = eval(value);
@@ -145,19 +145,11 @@ $(function () {
}
}*/
- var purposes = package.purposes;
- var commercial = false;
- var _console = false;
- if (purposes != null)
- for (var i = 0, e = purposes.length; i != e; ++i) {
- var purpose = purposes[i];
- if (purpose == "commercial")
- commercial = true;
- else if (purpose == "console")
- _console = true;
- }
+ var commercial = package.hasTag('cydia::commercial');
if (!commercial)
$(".commercial").remove();
+
+ var _console = package.hasTag('purpose::console');
if (!_console)
$(".console").remove();
@@ -174,6 +166,14 @@ $(function () {
//$("#notice-src").src("http://saurik.cachefly.net/notice/" + idc + ".html");
+ /*var store = commercial;
+ if (!store)
+ $(".activation").remove();
+ else {
+ var activation = api + 'activation/' + idc;
+ $("#activation-src").src(activation);
+ }*/
+
var depiction = package.depiction;
if (depiction == null)
$(".depiction").remove();
diff --git a/Cydia.mm b/Cydia.mm
index d898ef3..ebab213 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -383,10 +383,12 @@ extern NSString * const kCAFilterNearest;
#define ForRelease 1
#define ForSaurik (1 && !ForRelease)
+#define LogBrowser (0 && !ForRelease)
+#define ManualRefresh (1 && !ForRelease)
#define ShowInternals (1 && !ForRelease)
#define IgnoreInstall (0 && !ForRelease)
#define RecycleWebViews 0
-#define AlwaysReload (1 && !ForRelease)
+#define AlwaysReload (0 && !ForRelease)
#if ForRelease
#undef _trace
@@ -768,6 +770,11 @@ static CGColor Black_;
static CGColor Off_;
static CGColor White_;
static CGColor Gray_;
+static CGColor Green_;
+static CGColor Purple_;
+static CGColor Purplish_;
+
+static UIColor *CommercialColor_;
static NSString *App_;
static NSString *Home_;
@@ -1416,6 +1423,7 @@ class Progress :
- (BOOL) hasTag:(NSString *)tag;
- (NSString *) primaryPurpose;
- (NSArray *) purposes;
+- (bool) isCommercial;
- (NSComparisonResult) compareByName:(Package *)package;
- (NSComparisonResult) compareBySection:(Package *)package;
@@ -1469,6 +1477,17 @@ class Progress :
[super dealloc];
}
++ (NSString *) webScriptNameForSelector:(SEL)selector {
+ if (selector == @selector(hasTag:))
+ return @"hasTag";
+ else
+ return nil;
+}
+
++ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector {
+ return [self webScriptNameForSelector:selector] == nil;
+}
+
+ (NSArray *) _attributeKeys {
return [NSArray arrayWithObjects:@"applications", @"author", @"depiction", @"description", @"essential", @"homepage", @"icon", @"id", @"installed", @"latest", @"maintainer", @"name", @"purposes", @"section", @"size", @"source", @"sponsor", @"tagline", @"warnings", nil];
}
@@ -2117,6 +2136,10 @@ class Progress :
return [purposes count] == 0 ? nil : purposes;
}
+- (bool) isCommercial {
+ return [self hasTag:@"cydia::commercial"];
+}
+
- (NSComparisonResult) compareByName:(Package *)package {
NSString *lhs = [self name];
NSString *rhs = [package name];
@@ -3704,12 +3727,14 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
/* }}} */
/* Package Cell {{{ */
-@interface PackageCell : UISimpleTableCell {
+@interface PackageCell : UITableCell {
UIImage *icon_;
NSString *name_;
NSString *description_;
+ bool commercial_;
NSString *source_;
UIImage *badge_;
+ bool cached_;
#ifdef USE_BADGES
UITextLabel *status_;
#endif
@@ -3779,6 +3804,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
name_ = [[package name] retain];
description_ = [[package tagline] retain];
+ commercial_ = [package isCommercial];
NSString *label = nil;
bool trusted = false;
@@ -3819,6 +3845,29 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[status_ setText:nil];
}
#endif
+
+ cached_ = false;
+}
+
+- (void) drawRect:(CGRect)rect {
+ if (!cached_) {
+ //[self setBackgroundColor:(commercial_ ? CommercialColor_ : [UIColor whiteColor])];
+ cached_ = true;
+ }
+
+ [super drawRect:rect];
+}
+
+- (void) drawBackgroundInRect:(CGRect)rect withFade:(float)fade {
+ if (fade == 0 && commercial_) {
+ CGContextRef context(UIGraphicsGetCurrentContext());
+ [[self backgroundColor] set];
+ CGRect back(rect);
+ back.size.height -= 1;
+ CGContextFillRect(context, back);
+ }
+
+ [super drawBackgroundInRect:rect withFade:fade];
}
- (void) drawContentInRect:(CGRect)rect selected:(BOOL)selected {
@@ -3848,12 +3897,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
UISetColor(White_);
if (!selected)
- UISetColor(Black_);
+ UISetColor(commercial_ ? Purple_ : Black_);
[name_ drawAtPoint:CGPointMake(48, 8) forWidth:240 withFont:Font18Bold_ ellipsis:2];
[source_ drawAtPoint:CGPointMake(58, 29) forWidth:225 withFont:Font12_ ellipsis:2];
if (!selected)
- UISetColor(Gray_);
+ UISetColor(commercial_ ? Purplish_ : Gray_);
[description_ drawAtPoint:CGPointMake(12, 46) forWidth:280 withFont:Font14_ ellipsis:2];
[super drawContentInRect:rect selected:selected];
@@ -4121,6 +4170,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
_transient Database *database_;
Package *package_;
NSString *name_;
+ bool commercial_;
NSMutableArray *buttons_;
}
@@ -4178,7 +4228,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
- (bool) _allowJavaScriptPanel {
- return false;
+ return commercial_;
}
#if !AlwaysReload
@@ -4239,6 +4289,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
if (package != nil) {
package_ = [package retain];
name_ = [[package id] retain];
+ commercial_ = [package isCommercial];
[self loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"package" ofType:@"html"]]];
@@ -4254,8 +4305,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
}
-- (bool) _loading {
- return false;
+- (bool) isLoading {
+ return commercial_ ? [super isLoading] : false;
}
- (void) reloadData {
@@ -5173,7 +5224,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
#endif
-- (bool) _loading {
+- (bool) isLoading {
return false;
}
@@ -6558,7 +6609,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
// XXX: what is this line of code for?
if ([packages count] == 0);
- else if (Loaded_ || ForSaurik) loaded:
+ else if (Loaded_ || ManualRefresh) loaded:
[self _loaded];
else {
Loaded_ = YES;
@@ -7444,6 +7495,17 @@ int main(int argc, char *argv[]) { _pooled
Off_.Set(space_, 0.9, 0.9, 0.9, 1.0);
White_.Set(space_, 1.0, 1.0, 1.0, 1.0);
Gray_.Set(space_, 0.4, 0.4, 0.4, 1.0);
+ Green_.Set(space_, 0.0, 0.5, 0.0, 1.0);
+ Purple_.Set(space_, 0.0, 0.0, 0.7, 1.0);
+ Purplish_.Set(space_, 0.4, 0.4, 0.8, 1.0);
+ /*Purple_.Set(space_, 1.0, 0.3, 0.0, 1.0);
+ Purplish_.Set(space_, 1.0, 0.6, 0.4, 1.0); ORANGE */
+ /*Purple_.Set(space_, 1.0, 0.5, 0.0, 1.0);
+ Purplish_.Set(space_, 1.0, 0.7, 0.2, 1.0); ORANGISH */
+ /*Purple_.Set(space_, 0.5, 0.0, 0.7, 1.0);
+ Purplish_.Set(space_, 0.7, 0.4, 0.8, 1.0); PURPLE */
+
+ CommercialColor_ = [UIColor colorWithRed:0.93f green:1.00f blue:0.88f alpha:1.00f];
Finishes_ = [NSArray arrayWithObjects:@"return", @"reopen", @"restart", @"reload", @"reboot", nil];
diff --git a/control b/control
index adafcef..49534cc 100644
--- a/control
+++ b/control
@@ -4,7 +4,7 @@ Priority: required
Section: Packaging
Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
-Version: 1.0.2769-43
+Version: 1.0.2787-43
Replaces: com.sosiphone.addcydia
Depends: apt, darwintools, pcre, shell-cmds
Conflicts: com.sosiphone.addcydia