summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2010-09-25 22:15:30 -0700
committerJay Freeman <saurik@Jay-Freemans-MacBook-Pro.local>2010-10-04 00:12:21 -0700
commit21ea11a48e66dea8bc917392ea80f045df3a56a6 (patch)
treea35631cb71850c6537d97b1ac1094febc650e3a6 /Cydia.mm
parenteb97a3a886e9b0423f1f085c611ecd0440cdd4b6 (diff)
Better Queue UI. Discoverable. WebKit JS/objc bridge.
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm43
1 files changed, 28 insertions, 15 deletions
diff --git a/Cydia.mm b/Cydia.mm
index 03d69bc..4400c3d 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -4057,11 +4057,19 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
}
+- (id) invokeDefaultMethodWithArguments:(NSArray *)args {
+ [self dismissModalViewControllerAnimated:YES];
+ [delegate_ cancelAndClear:NO];
+
+ return nil;
+}
+
- (void) webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame {
[super webView:sender didClearWindowObject:window forFrame:frame];
[window setValue:changes_ forKey:@"changes"];
[window setValue:issues_ forKey:@"issues"];
[window setValue:sizes_ forKey:@"sizes"];
+ [window setValue:self forKey:@"queue"];
}
- (id) initWithDatabase:(Database *)database {
@@ -4152,7 +4160,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[self loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"confirm" ofType:@"html"]]];
UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]
- initWithTitle:[NSString stringWithFormat:UCLocalize("SLASH_DELIMITED"), UCLocalize("CANCEL"), UCLocalize("QUEUE")]
+ initWithTitle:UCLocalize("CANCEL")//[NSString stringWithFormat:UCLocalize("SLASH_DELIMITED"), UCLocalize("CANCEL"), UCLocalize("QUEUE")]
style:UIBarButtonItemStylePlain
target:self
action:@selector(cancelButtonClicked)
@@ -4179,7 +4187,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
- (void) cancelButtonClicked {
- UIActionSheet *sheet = [[UIActionSheet alloc]
+ /*UIActionSheet *sheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:nil
@@ -4192,7 +4200,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[sheet addButtonWithTitle:UCLocalize("CONTINUE_QUEUING")];
[sheet setContext:@"cancel"];
- [delegate_ showActionSheet:[sheet autorelease] fromItem:[[self navigationItem] leftBarButtonItem]];
+ [delegate_ showActionSheet:[sheet autorelease] fromItem:[[self navigationItem] leftBarButtonItem]];*/
+ [self dismissModalViewControllerAnimated:YES];
+ [delegate_ cancelAndClear:YES];
}
#if !AlwaysReload
@@ -5067,9 +5077,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
return files_ == nil ? 0 : [files_ count];
}
-- (float) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 24;
-}
+/*- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+ return 24.0f;
+}*/
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *reuseIdentifier = @"Cell";
@@ -5094,6 +5104,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
files_ = [[NSMutableArray arrayWithCapacity:32] retain];
list_ = [[UITableView alloc] initWithFrame:[[self view] bounds]];
+ [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [list_ setRowHeight:24.0f];
[[self view] addSubview:list_];
[list_ setDataSource:self];
@@ -5436,10 +5448,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[list_ deselectRowAtIndexPath:[list_ indexPathForSelectedRow] animated:animated];
}
-- (CGFloat) tableView:(UITableView *)table heightForRowAtIndexPath:(NSIndexPath *)path {
- return 73;
+/*- (CGFloat) tableView:(UITableView *)table heightForRowAtIndexPath:(NSIndexPath *)path {
return [PackageCell heightForPackage:[self packageAtIndexPath:path]];
-}
+}*/
- (NSIndexPath *) tableView:(UITableView *)table willSelectRowAtIndexPath:(NSIndexPath *)path {
Package *package([self packageAtIndexPath:path]);
@@ -5471,6 +5482,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
list_ = [[UITableView alloc] initWithFrame:[self bounds] style:UITableViewStylePlain];
[list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [list_ setRowHeight:73.0f];
[self addSubview:list_];
[list_ setDataSource:self];
@@ -6766,9 +6778,9 @@ freeing the view controllers on tab change */
return editing_ ? [sections_ count] : [filtered_ count] + 1;
}
-- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 45;
-}
+/*- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+ return 45.0f;
+}*/
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *reuseIdentifier = @"SectionCell";
@@ -6824,6 +6836,7 @@ freeing the view controllers on tab change */
list_ = [[UITableView alloc] initWithFrame:[[self view] bounds]];
[list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [list_ setRowHeight:45.0f];
[[self view] addSubview:list_];
[list_ setDataSource:self];
@@ -7019,10 +7032,9 @@ freeing the view controllers on tab change */
return cell;
}
-- (CGFloat) tableView:(UITableView *)table heightForRowAtIndexPath:(NSIndexPath *)path {
- return 73;
+/*- (CGFloat) tableView:(UITableView *)table heightForRowAtIndexPath:(NSIndexPath *)path {
return [PackageCell heightForPackage:[self packageAtIndexPath:path]];
-}
+}*/
- (NSIndexPath *) tableView:(UITableView *)table willSelectRowAtIndexPath:(NSIndexPath *)path {
Package *package([self packageAtIndexPath:path]);
@@ -7054,6 +7066,7 @@ freeing the view controllers on tab change */
list_ = [[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain];
[list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [list_ setRowHeight:73.0f];
[[self view] addSubview:list_];
[list_ setDataSource:self];