summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-08-23 23:18:06 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-08-23 23:18:06 +0000
commit2c75d26cc6ab1c489c280c9c2ba988327db50b11 (patch)
tree7fda0c991e05c292e995dee08a14f7f1bced4bb4
parent88d775019b9bb034b12d4938dd1862d22950326a (diff)
Do not require SpringBoard/ headers.
-rw-r--r--MobileSafety.mm33
1 files changed, 23 insertions, 10 deletions
diff --git a/MobileSafety.mm b/MobileSafety.mm
index 4d0c0e0..0446a35 100644
--- a/MobileSafety.mm
+++ b/MobileSafety.mm
@@ -24,19 +24,32 @@
#import <CoreGraphics/CGGeometry.h>
#import <UIKit/UIKit.h>
-#import <SpringBoard/SBAlertItem.h>
-#import <SpringBoard/SBAlertItemsController.h>
-#import <SpringBoard/SBButtonBar.h>
-#import <SpringBoard/SBStatusBarController.h>
-#import <SpringBoard/SBStatusBarDataManager.h>
-#import <SpringBoard/SBStatusBarTimeView.h>
-#import <SpringBoard/SBUIController.h>
-
#include "CydiaSubstrate.h"
+@class SBButtonBar;
+@class SBStatusBar;
+@class SBUIController;
+
Class $SafeModeAlertItem;
Class $SBAlertItemsController;
+@interface SBAlertItem : NSObject {
+}
+- (UIAlertView *) alertSheet;
+- (void) dismiss;
+@end
+
+@interface SBAlertItemsController : NSObject {
+}
++ (SBAlertItemsController *) sharedInstance;
+- (void) activateAlertItem:(SBAlertItem *)item;
+@end
+
+@interface SBStatusBarTimeView : UIView {
+}
+- (id) textFont;
+@end
+
@interface UIApplication (CydiaSubstrate)
- (void) applicationOpenURL:(id)url;
@end
@@ -65,7 +78,7 @@ void SafeModeAlertItem$alertSheet$buttonClicked$(id self, SEL sel, id sheet, int
}
void SafeModeAlertItem$configure$requirePasscodeForActions$(id self, SEL sel, BOOL configure, BOOL require) {
- id sheet([self alertSheet]);
+ UIAlertView *sheet([self alertSheet]);
[sheet setDelegate:self];
[sheet setBodyText:@"We apologize for the inconvenience, but SpringBoard has just crashed.\n\nMobileSubstrate /did not/ cause this problem: it has protected you from it.\n\nYour device is now running in Safe Mode. All extensions that support this safety system are disabled.\n\nReboot (or restart SpringBoard) to return to the normal mode. To return to this dialog touch the status bar."];
[sheet addButtonWithTitle:@"OK"];
@@ -175,7 +188,7 @@ MSHook(void, SBStatusBarTimeView$tile, SBStatusBarTimeView *self, SEL sel) {
if (_time != nil)
[_time release];
_time = [@"Exit Safe Mode" retain];
- id font((id)[self textFont]);
+ id font([self textFont]);
CGSize size([_time sizeWithFont:font]);
CGRect frame([self frame]);
_textRect.size = size;