summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-07-23 19:07:44 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:08:12 +0000
commitc4ce98df82d3ed1c8f40dbb7cd10664218c87599 (patch)
tree119229b7f95ee3fae9e2ca9ed05ce00463de6816 /Cydia.mm
parenteeb9b1124a630aaa8c4f52ca4ac4d77fd1070732 (diff)
Removed Reorganize (temporary) and sped up notify_post.
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm57
1 files changed, 30 insertions, 27 deletions
diff --git a/Cydia.mm b/Cydia.mm
index f3057b3..1f6e175 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -2375,6 +2375,10 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
[progress_ removeFromSuperview];
[status_ removeFromSuperview];
+#ifdef __OBJC2__
+ notify_post("com.apple.mobile.application_installed");
+#endif
+
[delegate_ setStatusBarShowsProgress:NO];
//[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
@@ -2517,7 +2521,7 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
}
- (BOOL) isRunning {
- return NO;
+ return running_;
}
@end
@@ -5262,34 +5266,33 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
tag_ = tag;
}
+- (void) fixSpringBoard {
+ pid_t pid = ExecFork();
+ if (pid == 0) {
+ sleep(1);
+
+ if (pid_t child = fork()) {
+ waitpid(child, NULL, 0);
+ } else {
+ execlp("launchctl", "launchctl", "unload", SpringBoard_, NULL);
+ perror("launchctl unload");
+ exit(0);
+ }
+
+ execlp("launchctl", "launchctl", "load", SpringBoard_, NULL);
+ perror("launchctl load");
+ exit(0);
+ }
+}
+
- (void) applicationWillSuspend {
[database_ clean];
if (reload_) {
-#ifdef __OBJC2__
- notify_post("com.apple.mobile.application_installed");
- notify_post("com.apple.mobile.application_uninstalled");
-#else
- pid_t pid = ExecFork();
- if (pid == 0) {
#ifndef __OBJC2__
- sleep(1);
+ [self fixSpringBoard];
#endif
-
- if (pid_t child = fork()) {
- waitpid(child, NULL, 0);
- } else {
- execlp("launchctl", "launchctl", "unload", SpringBoard_, NULL);
- perror("launchctl unload");
- exit(0);
- }
-
- execlp("launchctl", "launchctl", "load", SpringBoard_, NULL);
- perror("launchctl load");
- exit(0);
- }
-#endif
- }
+}
[super applicationWillSuspend];
}
@@ -5304,7 +5307,7 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
hud_ = nil;
reload_ = true;
- [self suspendWithAnimation:YES];
+ [self fixSpringBoard];
return;
}
@@ -5458,11 +5461,11 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
[progress_ resetView];
- if (
+ /*if (
readlink("/Applications", NULL, 0) == -1 && errno == EINVAL ||
readlink("/usr/share", NULL, 0) == -1 && errno == EINVAL ||
readlink("/Library/Ringtones", NULL, 0) == -1 && errno == EINVAL ||
- readlink("/Library/Wallpapers", NULL, 0) == -1 && errno == EINVAL
+ readlink("/Library/Wallpaper", NULL, 0) == -1 && errno == EINVAL
) {
hud_ = [[UIProgressHUD alloc] initWithWindow:window_];
[hud_ setText:@"Reorganizing\nOne Minute!\nPlease Wait...\nDO NOT STOP"];
@@ -5476,7 +5479,7 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
toTarget:self
withObject:nil
];
- } else
+ } else*/
[self finish];
}