From 9daa7f25f2115cf9d9b428ab1aadf539d1d07c20 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Mon, 4 Oct 2010 07:05:20 -0400 Subject: Fix the warnings when building with AlwaysReload=0, and fix the action button for AlwaysReload=1 (actionButtonClicked -> customButtonClicked, to match the superclass, so there's an implementation to fall through to if AlwaysReload==1) --- Cydia.mm | 13 ++++++++----- iPhonePrivate.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Cydia.mm b/Cydia.mm index c28f93d..3afab9d 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -1216,6 +1216,7 @@ bool isSectionVisible(NSString *section) { - (void) removeProgressHUD:(UIProgressHUD *)hud; - (UCViewController *) pageForPackage:(NSString *)name; - (PackageController *) packageController; +- (void) showActionSheet:(UIActionSheet *)sheet fromItem:(UIBarButtonItem *)item; @end /* }}} */ @@ -5121,7 +5122,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { @end /* }}} */ /* Package Controller {{{ */ -@interface PackageController : CYBrowserController { +@interface PackageController : CYBrowserController < + UIActionSheetDelegate +> { _transient Database *database_; Package *package_; NSString *name_; @@ -5193,7 +5196,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } #if !AlwaysReload -- (void) _actionButtonClicked { +- (void) _customButtonClicked { int count([buttons_ count]); if (count == 0) return; @@ -5223,10 +5226,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } } -- (void) actionButtonClicked { +- (void) customButtonClicked { // Wait until it's done loading. if (![self isLoading]) - [self _actionButtonClicked]; + [self _customButtonClicked]; } - (void) reloadButtonClicked { @@ -5309,7 +5312,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { initWithTitle:count == 0 ? nil : count != 1 ? UCLocalize("MODIFY") : [buttons_ objectAtIndex:0] style:UIBarButtonItemStylePlain target:self - action:@selector(actionButtonClicked) + action:@selector(customButtonClicked) ]; if (![self isLoading]) [[self navigationItem] setRightBarButtonItem:actionItem]; else [super applyRightButton]; diff --git a/iPhonePrivate.h b/iPhonePrivate.h index 589dcf3..f9f03a4 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -54,6 +54,7 @@ typedef enum { @interface UIActionSheet (Apple) +- (void) setContext:(NSString *)context; - (NSString *) context; @end -- cgit v1.2.3