@end
/* }}} */
-@interface CYBrowserController : BrowserView {
+@interface CYBrowserController : BrowserController {
CydiaObject *cydia_;
}
} return self;
}
-- (void) didFinishLoading {
+- (void) applyRightButton {
UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]
initWithTitle:UCLocalize("CONFIRM")
style:UIBarButtonItemStylePlain
action:@selector(confirmButtonClicked)
];
#if !AlwaysReload && !IgnoreInstall
- if (issues_ == nil) [[self navigationItem] setRightBarButtonItem:rightItem];
- else [[self navigationItem] setRightBarButtonItem:nil];
+ if (issues_ == nil && ![self isLoading]) [[self navigationItem] setRightBarButtonItem:rightItem];
+ else [super applyRightButton];
+#else
+ [[self navigationItem] setRightBarButtonItem:nil];
#endif
[rightItem release];
}
}
- (void) actionButtonClicked {
- if (commercial_ && [self isLoading])
- [super _rightButtonClicked];
- else
+ // Never reload, that's bad. However, do nothing unless we are loaded.
+ // (Because free packages are never loading, their button will always work.)
+ if (![self isLoading])
[self _actionButtonClicked];
}
#endif
}
}
-- (void) didFinishLoading {
+- (void) applyRightButton {
int count = [buttons_ count];
UIBarButtonItem *actionItem = [[UIBarButtonItem alloc]
initWithTitle:count == 0 ? nil : count != 1 ? UCLocalize("MODIFY") : [buttons_ objectAtIndex:0]
target:self
action:@selector(actionButtonClicked)
];
- [[self navigationItem] setRightBarButtonItem:actionItem];
+ if (![self isLoading]) [[self navigationItem] setRightBarButtonItem:actionItem];
+ else [super applyRightButton];
[actionItem release];
}