-- (NSString *) title {
- return title_ == nil ? UCLocalize("LOADING") : title_;
-}
-
-- (NSString *) backButtonTitle {
- return UCLocalize("BROWSER");
+- (void) reloadButtons {
+ if ([self isLoading]) {
+ UIBarButtonItem *reloadItem = [[UIBarButtonItem alloc]
+ initWithTitle:@" "
+ style:UIBarButtonItemStylePlain
+ target:self
+ action:@selector(_rightButtonClicked)
+ ];
+ [[self navigationItem] setRightBarButtonItem:reloadItem];
+ [[reloadItem view] addSubview:indicator_];
+ [[self navigationItem] setTitle:UCLocalize("LOADING")];
+ [reloadItem release];
+ } else {
+ UIBarButtonItem *reloadItem = [[UIBarButtonItem alloc]
+ initWithTitle:button_ ?: UCLocalize("RELOAD")
+ style:[self rightButtonStyle]
+ target:self
+ action:@selector(_rightButtonClicked)
+ ];
+ [[self navigationItem] setRightBarButtonItem:reloadItem animated:YES];
+ [[self navigationItem] setTitle:title_];
+ [reloadItem release];
+
+ if (function_ == nil) [self didFinishLoading];
+ }