diff options
author | Grant Paul <chpwn@chpwn.com> | 2010-08-10 17:38:42 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 08:21:35 +0000 |
commit | be2b3d7b4fdbf477e754aa8e0b12a5d34551b303 (patch) | |
tree | f2603fc0f5bd8107dea1e1c72891c8ada39a54cf /Cydia.mm | |
parent | 37d2b2a9dd38bfb3cf94c48ccfa8bec7c497de86 (diff) |
Commit (chpwn): fixed-cyactionsheet.patch
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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]); |