]> git.saurik.com Git - veency.git/commitdiff
Use SpringBoardAccess for statusbar in backboardd.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Feb 2013 12:48:28 +0000 (12:48 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Feb 2013 12:48:28 +0000 (12:48 +0000)
Tweak.mm
control
makefile

index 62654ad2ce2ebf17790e806e1fd3514c1e35b84d..5e5eddd5b19093d4e00be07b60c08ffed35c6f1f 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -49,6 +49,8 @@
 #import <SpringBoard/SBDismissOnlyAlertItem.h>
 #import <SpringBoard/SBStatusBarController.h>
 
+#include "SpringBoardAccess.h"
+
 extern "C" void CoreSurfaceBufferFlushProcessorCaches(CoreSurfaceBufferRef buffer);
 
 static size_t width_;
@@ -163,10 +165,12 @@ static void VNCEnabled();
 + (void) removeStatusBarItem {
     AshikaseSetEnabled(false, false);
 
-    if ($SBStatusBarController != nil)
+    if (SBA_available())
+        SBA_removeStatusBarImage(const_cast<char *>("Veency"));
+    else if ($SBStatusBarController != nil)
         [[$SBStatusBarController sharedStatusBarController] removeStatusBarItem:@"Veency"];
-    else
-        [[UIApplication sharedApplication] removeStatusBarImageNamed:@"Veency"];
+    else if (UIApplication *app = [UIApplication sharedApplication])
+        [app removeStatusBarImageNamed:@"Veency"];
 }
 
 + (void) registerClient {
@@ -182,10 +186,12 @@ static void VNCEnabled();
     ++clients_;
     AshikaseSetEnabled(true, false);
 
-    if ($SBStatusBarController != nil)
+    if (SBA_available())
+        SBA_addStatusBarImage(const_cast<char *>("Veency"));
+    else if ($SBStatusBarController != nil)
         [[$SBStatusBarController sharedStatusBarController] addStatusBarItem:@"Veency"];
-    else
-        [[UIApplication sharedApplication] addStatusBarImageNamed:@"Veency"];
+    else if (UIApplication *app = [UIApplication sharedApplication])
+        [app addStatusBarImageNamed:@"Veency"];
 }
 
 + (void) performSetup:(NSThread *)thread {
diff --git a/control b/control
index c9721049be92c24d0ec9bd27cc9cb6c268a64514..6ec0a58f6103caa6a5782a27e6b903eb82809d00 100644 (file)
--- a/control
+++ b/control
@@ -8,7 +8,7 @@ Architecture: iphoneos-arm
 Version: 0.9.3379
 Description: a VNC /server/ for the iPhone
 Name: Veency
-Depends: mobilesubstrate (>= 0.9.2966-1), libvncserver, com.saurik.iphone.ske, preferenceloader, jp.ashikase.mousesupport | firmware (<< 3.0), libstatusbar | firmware (<< 4.0)
+Depends: mobilesubstrate (>= 0.9.2966-1), libvncserver, com.saurik.iphone.ske, preferenceloader, jp.ashikase.mousesupport | firmware (<< 3.0), libstatusbar | firmware (<< 4.0), firmware (<< 6.0) | ch.ringwald.springboardaccess
 Author: Jay Freeman (saurik) <saurik@saurik.com>
 Depiction: http://cydia.saurik.com/info/veency/
 Tag: purpose::daemon, role::enduser
index 2c3d88ba9b6b9705cbd9e040ca1ddfc275a85ba3..d9368ec616d271465cc9cf61a4be2a59ca9ee09f 100644 (file)
--- a/makefile
+++ b/makefile
@@ -2,6 +2,7 @@ name := Veency
 id := vncs
 flags := -lvncserver -framework IOMobileFramebuffer -framework CoreSurface -framework IOKit -framework GraphicsServices -I/apl/inc/iPhoneOS-2.0 -framework QuartzCore -weak_reference_mismatches weak -framework UIKit -framework GraphicsServices
 flags += -fvisibility=hidden
+flags += SpringBoardAccess.c
 base := ../tweaks
 include ../tweaks/tweak.mk