]> git.saurik.com Git - cydget.git/commitdiff
For the sake of argument, let's assume this code was a good idea.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Jun 2010 12:55:41 +0000 (12:55 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Jun 2010 12:55:41 +0000 (12:55 +0000)
LockScreen.mm
control

index 5e26660212607f7def5ef01b920c05a952e2aea7..cf6704ddca127d1c0e0b2ab5f8a8c569456826b4 100644 (file)
@@ -42,6 +42,7 @@
 #import <UIKit/UIKit.h>
 #import <AddressBook/AddressBook.h>
 
+#import <SpringBoard/SBStatusBarController.h>
 #import <SpringBoardUI/SBAwayViewPluginController.h>
 #import <TelephonyUI/TPBottomLockBar.h>
 
@@ -117,6 +118,8 @@ while (false)
 @end
 
 static Class $CydgetController(objc_getClass("CydgetController"));
+static Class $UIFormAssistant(objc_getClass("CydgetController"));
+static Class $SBStatusBarController(objc_getClass("SBStatusBarController"));
 
 @interface NSString (UIKit)
 - (NSString *) stringByAddingPercentEscapes;
@@ -423,7 +426,7 @@ class Pcre {
 
 - (id) init {
     CGRect frame = {{0, 0}, {320, 480}};
-    frame.size.height -= GSDefaultStatusBarHeight();
+    frame.size.height -= [[[$SBStatusBarController sharedStatusBarController] statusBarView] frame].size.height;
 
     if ((self = [super initWithFrame:frame]) != nil) {
         loading_ = [[NSMutableSet alloc] initWithCapacity:3];
@@ -470,9 +473,8 @@ class Pcre {
 
         if ([document_ respondsToSelector:@selector(enableReachability)])
             [document_ enableReachability];
-
-        [document_ setAllowsMessaging:YES];
-
+        if ([document_ respondsToSelector:@selector(setAllowsMessaging:)])
+            [document_ setAllowsMessaging:YES];
         if ([document_ respondsToSelector:@selector(useSelectionAssistantWithMode:)])
             [document_ useSelectionAssistantWithMode:0];
 
@@ -526,7 +528,9 @@ class Pcre {
 
         [document_ setDelegate:self];
         [document_ setGestureDelegate:self];
-        [document_ setFormEditingDelegate:self];
+
+        if ([document_ respondsToSelector:@selector(setFormEditingDelegate:)])
+            [document_ setFormEditingDelegate:self];
         [document_ setInteractionDelegate:self];
 
         [scroller_ addSubview:document_];
@@ -619,10 +623,10 @@ class Pcre {
 /* XXX: WebThreadLock? */
 - (void) _fixScroller:(CGRect)bounds {
     float extra;
-    if (!editing_)
+    if (!editing_ || $UIFormAssistant == nil)
         extra = 0;
     else {
-        UIFormAssistant *assistant([UIFormAssistant sharedFormAssistant]);
+        UIFormAssistant *assistant([$UIFormAssistant sharedFormAssistant]);
         CGRect peripheral([assistant peripheralFrame]);
         extra = peripheral.size.height;
     }
diff --git a/control b/control
index ce1faae845e65b5bb4ac864b911c1b49d5c93e1c..8fbd532bee7eca22285a9eae1b03d62d282345bb 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: optional
 Section: Development
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3141-1
+Version: 0.9.3160-1
 Description: framework for managing lock screen plugins
 Name: Cydget
 Depends: mobilesubstrate (>= 0.9.2587-1), firmware (>= 2.2), preferenceloader, apr-lib, pcre, cycript (>= 0.9.292-1)