- UIFont *font([UIFont systemFontOfSize:15]);
-
- prompt_ = [[UITextLabel alloc] initWithFrame:prmrect];
-
- [prompt_ setColor:[UIColor colorWithCGColor:(ugly ? Blueish_ : Off_)]];
- [prompt_ setBackgroundColor:[UIColor clearColor]];
- [prompt_ setFont:font];
-
- [overlay_ addSubview:prompt_];
-
- CGSize prgsize = {75, 100};
-
- CGRect prgrect = {{
- ovrrect.size.width - prgsize.width - 10,
- (ovrrect.size.height - prgsize.height) / 2
- } , prgsize};
-
- progress_ = [[UIProgressBar alloc] initWithFrame:prgrect];
- [progress_ setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [overlay_ addSubview:progress_];
-
- [progress_ setStyle:0];
-
- cancel_ = [[UINavigationButton alloc] initWithTitle:UCLocalize("CANCEL") style:UINavigationButtonStyleHighlighted];
- [progress_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin];
- [cancel_ addTarget:self action:@selector(_onCancel) forControlEvents:UIControlEventTouchUpInside];
-
- CGRect frame = [cancel_ frame];
- frame.origin.x = ovrrect.size.width - frame.size.width - 5;
- frame.origin.y = (ovrrect.size.height - frame.size.height) / 2;
- [cancel_ setFrame:frame];
-
- [cancel_ setBarStyle:barstyle];
- } return self;
-}
-
-- (void) _onCancel {
- updating_ = false;
- [cancel_ removeFromSuperview];
-}
-
-- (void) _update { _pooled
- Status status;
- status.setDelegate(self);
- [database_ updateWithStatus:status];
-
- [self
- performSelectorOnMainThread:@selector(_update_)
- withObject:nil
- waitUntilDone:NO
- ];
-}
-
-- (void) setProgressError:(NSString *)error withTitle:(NSString *)title {
- [prompt_ setText:[NSString stringWithFormat:UCLocalize("COLON_DELIMITED"), UCLocalize("ERROR"), error]];
-}
-
-/*
- UIActionSheet *sheet = [[[UIActionSheet alloc]
- initWithTitle:[NSString stringWithFormat:UCLocalize("COLON_DELIMITED"), UCLocalize("ERROR"), UCLocalize("REFRESH")]
- buttons:[NSArray arrayWithObjects:
- UCLocalize("OK"),
- nil]
- defaultButtonIndex:0
- delegate:self
- context:@"refresh"
- ] autorelease];
-
- [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
-
- [sheet setBodyText:error];
- [sheet popupAlertAnimated:YES];
-
- [self reloadButtons];
-*/
-
-- (void) setProgressTitle:(NSString *)title {
- [self
- performSelectorOnMainThread:@selector(_setProgressTitle:)
- withObject:title
- waitUntilDone:YES
- ];
-}
-
-- (void) setProgressPercent:(float)percent {
- [self
- performSelectorOnMainThread:@selector(_setProgressPercent:)
- withObject:[NSNumber numberWithFloat:percent]
- waitUntilDone:YES
- ];
-}
-
-- (void) startProgress {
-}
-
-- (void) addProgressOutput:(NSString *)output {
- [self
- performSelectorOnMainThread:@selector(_addProgressOutput:)
- withObject:output
- waitUntilDone:YES
- ];
-}
-
-- (bool) isCancelling:(size_t)received {
- return !updating_;