summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cydia.app/package.html14
-rw-r--r--Cydia.app/package.js26
-rw-r--r--Cydia.mm69
-rw-r--r--control2
4 files changed, 53 insertions, 58 deletions
diff --git a/Cydia.app/package.html b/Cydia.app/package.html
index 317f41b..5bd2f4c 100644
--- a/Cydia.app/package.html
+++ b/Cydia.app/package.html
@@ -9,6 +9,20 @@
<script type="text/javascript" src="localize.js"></script>
<base target="_blank"/>
+<script type="text/javascript">
+ var onframe = function(id, name) {
+ var node = document.getElementById(id);
+ var frame = window.frames[name];
+
+ try {
+ node.height = frame.document.body.scrollHeight;
+ } catch (e) {
+ node.height = 370;
+ node.width = 320;
+ }
+ };
+</script>
+
<!--script type="text/javascript">
var count = -1;
var loaded = function() {
diff --git a/Cydia.app/package.js b/Cydia.app/package.js
index 104bd8c..6ec06cf 100644
--- a/Cydia.app/package.js
+++ b/Cydia.app/package.js
@@ -78,7 +78,16 @@ var special_ = function () {
if (typeof value.notice == "undefined")
$(".notice").addClass("deleted");
else
- $("#notice-src").src(value.notice);
+ $("#notice-src")[0].outerHTML = '<iframe' +
+ ' class="notice"' +
+ ' id="notice-src"' +
+ ' frameborder="0"' +
+ ' width="320"' +
+ ' height="0"' +
+ ' target="_top"' +
+ ' src="' + $.xml(value.notice) + '"' +
+ ' onload="onframe(' + "'notice-src', 'notice'" + ')"' +
+ '></iframe>';
if (typeof value.rating == "undefined")
$(".rating").addClass("deleted");
@@ -201,7 +210,17 @@ var special_ = function () {
$(".depiction").addClass("deleted");
else {
$(".description").addClass("deleted");
- $("#depiction-src").src(depiction);
+
+ $("#depiction-src")[0].outerHTML = '<iframe' +
+ ' class="depiction"' +
+ ' id="depiction-src"' +
+ ' frameborder="0"' +
+ ' width="320"' +
+ ' height="0"' +
+ ' target="_top"' +
+ ' src="' + $.xml(depiction) + '"' +
+ ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' +
+ '></iframe>';
}
var description = package.longDescription;
@@ -308,6 +327,7 @@ var special = function () {
' width="320"' +
' height="0"' +
' target="_top"' +
+ ' onload="onframe(' + "'notice-src', 'notice'" + ')"' +
'></iframe>';
var depiction = $("#depiction-src");
@@ -319,7 +339,7 @@ var special = function () {
' width="320"' +
' height="0"' +
' target="_top"' +
- ' onload_="loaded()"' +
+ ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' +
'></iframe>';
special_();
diff --git a/Cydia.mm b/Cydia.mm
index 51eea37..857819a 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -189,56 +189,6 @@ void PrintTimes() {
#define _end }
/* }}} */
-/* Objective-C Handle<> {{{ */
-template <typename Type_>
-class _H {
- typedef _H<Type_> This_;
-
- private:
- Type_ *value_;
-
- _finline void Retain_() {
- if (value_ != nil)
- [value_ retain];
- }
-
- _finline void Clear_() {
- if (value_ != nil)
- [value_ release];
- }
-
- public:
- _finline _H(const This_ &rhs) :
- value_(rhs.value_ == nil ? nil : [rhs.value_ retain])
- {
- }
-
- _finline _H(Type_ *value = NULL, bool mended = false) :
- value_(value)
- {
- if (!mended)
- Retain_();
- }
-
- _finline ~_H() {
- Clear_();
- }
-
- _finline operator Type_ *() const {
- return value_;
- }
-
- _finline This_ &operator =(Type_ *value) {
- if (value_ != value) {
- Type_ *old(value_);
- value_ = value;
- Retain_();
- if (old != nil)
- [old release];
- } return *this;
- }
-};
-/* }}} */
#define _pooled _H<NSAutoreleasePool> _pool([[NSAutoreleasePool alloc] init], true);
@@ -426,15 +376,15 @@ static const CFStringCompareFlags LaxCompareFlags_ = kCFCompareCaseInsensitive |
#define TraceLogging (1 && !ForRelease)
#define HistogramInsertionSort (0 && !ForRelease)
#define ProfileTimes (0 && !ForRelease)
-#define ForSaurik (0 && !ForRelease)
+#define ForSaurik (1 && !ForRelease)
#define LogBrowser (0 && !ForRelease)
#define TrackResize (0 && !ForRelease)
-#define ManualRefresh (0 && !ForRelease)
+#define ManualRefresh (1 && !ForRelease)
#define ShowInternals (0 && !ForRelease)
#define IgnoreInstall (0 && !ForRelease)
#define RecycleWebViews 0
-#define RecyclePackageViews 1
-#define AlwaysReload (0 && !ForRelease)
+#define RecyclePackageViews (1 && ForRelease)
+#define AlwaysReload (1 && !ForRelease)
#if !TraceLogging
#undef _trace
@@ -3680,6 +3630,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
+ (NSString *) webScriptNameForSelector:(SEL)selector {
if (selector == @selector(close))
return @"close";
+ else if (selector == @selector(getInstalledPackages))
+ return @"getInstalledPackages";
else if (selector == @selector(getPackageById:))
return @"getPackageById";
else if (selector == @selector(setAutoPopup:))
@@ -3718,6 +3670,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
return [feature isEqualToString:@"window.open"];
}
+- (NSArray *) getInstalledPackages {
+ NSArray *packages([[Database sharedInstance] packages]);
+ NSMutableArray *installed([NSMutableArray arrayWithCapacity:[packages count]]);
+ for (Package *package in installed)
+ if ([package installed] != nil)
+ [installed addObject:package];
+ return installed;
+}
+
- (Package *) getPackageById:(NSString *)id {
Package *package([[Database sharedInstance] packageWithName:id]);
[package parse];
diff --git a/control b/control
index 30ba83c..7c9a0fe 100644
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: required
Section: Packaging
Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
-Version: 1.0.3032-1
+Version: 1.0.3044-2
Replaces: com.sosiphone.addcydia
Depends: apr-lib, apt7-lib, apt7-key, darwintools, pcre, shell-cmds, system-cmds, essential
Pre-Depends: dpkg (>= 1.14.25-8)