- (void) syncData;
- (void) showSettings;
- (UIProgressHUD *) addProgressHUD;
+- (BOOL) hudIsShowing;
- (void) removeProgressHUD:(UIProgressHUD *)hud;
- (CYViewController *) pageForPackage:(NSString *)name;
- (PackageController *) packageController;
- (void) dealloc {
if (source_ != nil)
[source_ release];
- if (section$_ != nil)
- [section$_ release];
if (latest_ != nil)
[latest_ release];
if (section_.empty())
return nil;
- std::replace(section_.data(), section_.data() + section_.size(), ' ', '_');
+ std::replace(section_.data(), section_.data() + section_.size(), '_', ' ');
NSString *name(section_);
lookup:
goto lookup;
}
- section$_ = [[name stringByReplacingCharacter:'_' withCharacter:' '] retain];
+ section$_ = name;
} return section$_;
}
}
- (bool) isInstalledAndVisible:(NSNumber *)number {
- return (![number boolValue] || [self visible]) && ![self uninstalled];
+ return ((![number boolValue] && ![role_ isEqualToString:@"cydia"]) || [self visible]) && ![self uninstalled];
}
- (bool) isVisibleInSection:(NSString *)name {
[self showDoneButton];
}
-- (void) doneButtonClicked {
+- (void) saveAndClose {
[self save];
+
+ [[self navigationItem] setRightBarButtonItem:nil];
[[self navigationController] dismissModalViewControllerAnimated:YES];
}
+- (void) doneButtonClicked {
+ UIActivityIndicatorView *spinner = [[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20.0f, 20.0f)] autorelease];
+ [spinner startAnimating];
+ UIBarButtonItem *spinItem = [[[UIBarButtonItem alloc] initWithCustomView:spinner] autorelease];
+ [[self navigationItem] setRightBarButtonItem:spinItem];
+
+ [self performSelector:@selector(saveAndClose) withObject:nil afterDelay:0];
+}
+
- (void) showDoneButton {
UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]
initWithTitle:UCLocalize("DONE")
bool dropped_;
bool updating_;
- id updatedelegate_;
+ NSObject<CydiaDelegate> *updatedelegate_;
UITabBarController *root_;
}
}
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
+ return ![updatedelegate_ hudIsShowing] && (IsWildcat_ || orientation == UIInterfaceOrientationPortrait);
}
- (void) setTabBarController:(UITabBarController *)controller {
int tag_;
UIKeyboard *keyboard_;
- UIProgressHUD *hud_;
+ int huds_;
SectionsController *sections_;
ChangesController *changes_;
[super applicationWillSuspend];
}
+- (BOOL) hudIsShowing {
+ return (huds_ > 0);
+}
+
- (void) applicationSuspend:(__GSEvent *)event {
// Use external process status API internally.
// This is probably a really bad idea.
notify_cancel(notify_token);
}
- if (hud_ == nil && status == 0)
+ if (![self hudIsShowing] && status == 0)
[super applicationSuspend:event];
}
- (void) _animateSuspension:(BOOL)arg0 duration:(double)arg1 startTime:(double)arg2 scale:(float)arg3 {
- if (hud_ == nil)
+ if (![self hudIsShowing])
[super _animateSuspension:arg0 duration:arg1 startTime:arg2 scale:arg3];
}
- (void) _setSuspended:(BOOL)value {
- if (hud_ == nil)
+ if (![self hudIsShowing])
[super _setSuspended:value];
}
while ([target modalViewController] != nil) target = [target modalViewController];
[[target view] addSubview:hud];
+ huds_++;
return hud;
}
[hud show:NO];
[hud removeFromSuperview];
[window_ setUserInteractionEnabled:YES];
+ huds_--;
}
- (CYViewController *) pageForPackage:(NSString *)name {