From be2b3d7b4fdbf477e754aa8e0b12a5d34551b303 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Tue, 10 Aug 2010 17:38:42 +0000 Subject: [PATCH] Commit (chpwn): fixed-cyactionsheet.patch --- Cydia.mm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Cydia.mm b/Cydia.mm index d8f6f519..86ddb4a8 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -292,6 +292,7 @@ static _finline NSString *CydiaURL(NSString *path) { - (id) initWithTitle:(NSString *)title buttons:(NSArray *)buttons defaultButtonIndex:(int)index { if ((self = [super init])) { + [self setTitle:title]; [self setDelegate:self]; for (NSString *button in buttons) [self addButtonWithTitle:button]; [self setCancelButtonIndex:index]; @@ -302,9 +303,13 @@ static _finline NSString *CydiaURL(NSString *path) { button_ = buttonIndex + 1; } +- (void) dismiss { + [self dismissWithClickedButtonIndex:-1 animated:YES]; +} + - (int) yieldToPopupAlertAnimated:(BOOL)animated { button_ = 0; - [self popupAlertAnimated:animated]; + [self show]; NSRunLoop *loop([NSRunLoop currentRunLoop]); NSDate *future([NSDate distantFuture]); while (button_ == 0 && [loop runMode:NSDefaultRunLoopMode beforeDate:future]); @@ -4545,7 +4550,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { defaultButtonIndex:0 ] autorelease]); - [sheet setBodyText:error]; + [sheet setMessage:error]; [sheet yieldToPopupAlertAnimated:YES]; [sheet dismiss]; } @@ -8010,7 +8015,7 @@ static _finline void _setHomePage(Cydia *self) { defaultButtonIndex:-1 ] autorelease]); - [role setBodyText:UCLocalize("ROLE_EX")]; + [role setMessage:UCLocalize("ROLE_EX")]; int button([role yieldToPopupAlertAnimated:YES]); -- 2.45.2