diff options
author | Dustin L. Howett <dustin@howett.net> | 2010-10-04 10:15:46 -0400 |
---|---|---|
committer | Dustin L. Howett <dustin@howett.net> | 2010-10-04 10:15:46 -0400 |
commit | a5938ea5e2ca223b9e969fe0424f63d7a4b31a4c (patch) | |
tree | f70eadb248c8ea23453c04316caecf70af9fac56 /UICaboodle | |
parent | fed0d010a6c7632fb69cbfa3c25303f3cd103c72 (diff) |
Fix the custom button problem - applyRightButton was overriding BrowserView's support for custom buttons. We now just expose a default right button that is used in BrowserView's applyRightButton. Minor visual artifact: The 'Install' button flashes for non-commercial packages as it changes between loading/not-loading. Slightly better behaviour than before: AlwaysReload == 1 means the button is called 'Reload'.
Diffstat (limited to 'UICaboodle')
-rw-r--r-- | UICaboodle/BrowserView.h | 3 | ||||
-rw-r--r-- | UICaboodle/BrowserView.mm | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index f2b0db8..23be631 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -108,9 +108,10 @@ - (bool) allowSensitiveRequests; - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button; +- (void) customButtonClicked; - (void) applyRightButton; - (void) _startLoading; - (void) close; -@end
\ No newline at end of file +@end diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index ee8563f..1615795 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -1075,6 +1075,10 @@ static Class $UIWebBrowserView; return [customItem autorelease]; } +- (UIBarButtonItem *) rightButton { + return reloaditem_; +} + - (void) applyLoadingTitle { [[self navigationItem] setTitle:UCLocalize("LOADING")]; } @@ -1087,7 +1091,7 @@ static Class $UIWebBrowserView; } else if (button_) { [[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES]; } else { - [[self navigationItem] setRightBarButtonItem:reloaditem_ animated:YES]; + [[self navigationItem] setRightBarButtonItem:[self rightButton] animated:YES]; } } @@ -1615,4 +1619,4 @@ static Class $UIWebBrowserView; return 980; } -@end
\ No newline at end of file +@end |