This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

moved the startup.wav into SpringBoard.app

  • Loading branch information...
vladkorotnev committed Jul 20, 2011
1 parent 5f4b9c6 commit b6fdf57c854d07a8ba05ced77c0b86e60fa62fa2
@@ -1 +1 @@
-0.0.1-6
+0.0.1-7
View
@@ -1,4 +1,4 @@
-include theos/makefiles/common.mk
+include theos/makefiles/common_warnallow.mk
TWEAK_NAME = StartupSound
StartupSound_FILES = Tweak.xm SndDelegate.m donator.m
View
@@ -2,7 +2,6 @@
#import <objc/runtime.h>
#import <UIKit/UIKit.h>
#import "SndDelegate.h"
-#import "donator.h"
%hook SpringBoard
- (void)applicationDidFinishLaunching:(id)x {
@@ -24,9 +23,9 @@
if(![fm fileExistsAtPath:@"/var/mobile/.donate"]){
system("touch /var/mobile/.donate");
- Donator *donate = [[Donator alloc]init];
- UIAlertView *hello = [[UIAlertView alloc]initWithTitle:@"iStartupSound" message:@"Hello. \n Thanks for using iStartupSound. \n Warning: Since now startup.wav has moved to /System/Library/CoreServices/SpringBoard.app/startup.wav. \n Please move your files. \n Also, the new location for the file would allow use of startup sounds in themes. \n Thank you for using iStartupSound. \n Would you please donate me as little as $1 (you may donate more if you wish :) to keep the good software development? \n P.S. A new, better successor to iStartupSound is coming. Stay tuned on twitter: \n @vladkorotnev" delegate:donate cancelButtonTitle:@"Nah, I won't" otherButtonTitles:@"I'll donate", nil];
- [donate MyAlertViewIs:hello];
+ Class _SBAwayController = NSClassFromString(@"SBAwayController");
+[[_SBAwayController sharedAwayController]unlockWithSound:true isAutoUnlock:true];
+ UIAlertView *hello = [[UIAlertView alloc]initWithTitle:@"iStartupSound" message:@"Hello. \n Thanks for using iStartupSound. \n Warning: Since now startup.wav has moved to /System/Library/CoreServices/SpringBoard.app/startup.wav. \n Please move your files. \n Also, the new location for the file would allow use of startup sounds in themes. \n Thank you for using iStartupSound. \n Would you please donate me as little as $1 (you may donate more if you wish :) to keep the good software development?\n If you would like to donate, go to: \n http://vladkorotnev.github.com/donate \n\n \n P.S. A new, better successor to iStartupSound is coming. Stay tuned on twitter: \n @vladkorotnev" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[hello show];
[hello release];
}
Binary file not shown.
Binary file not shown.
View
@@ -1,10 +0,0 @@
-#import <objc/runtime.h>
-
-@interface Donator : NSObject <UIAlertViewDelegate> {
-
-}
-
--(void)MyAlertViewIs:(UIAlertView *)alert;
-
-@property (nonatomic,retain) UIAlertView *myAlert;
-@end
View
@@ -1,16 +0,0 @@
-#import "donator.h"
-
-@implementation Donator
-@synthesize myAlert;
-
--(void)MyAlertViewIs:(UIAlertView *)alert{
- myAlert = alert;
-}
-
-- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
-if(alertView == myAlert && buttonIndex == 1) {
-NSURL *url = [[NSURL alloc]initWithString: @"http://vladkorotnev.github.com/for_apps/donate/donate.html"];
-[[UIApplication sharedApplication]openURL:url];
-}
-}
-@end
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit b6fdf57

Please sign in to comment.