]> git.saurik.com Git - cydia.git/commitdiff
Commit (chpwn): fixed-cyactionsheet.patch
authorGrant Paul <chpwn@chpwn.com>
Tue, 10 Aug 2010 17:38:42 +0000 (17:38 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 08:21:35 +0000 (08:21 +0000)
Cydia.mm

index d8f6f519cec2eb17c91ee57be0198f8c7025b93f..86ddb4a81abe5163c2d56ba06eb1cbea13a13b87 100644 (file)
--- 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]);