summaryrefslogtreecommitdiff
path: root/cocoa/BrowserViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/BrowserViewController.m')
-rw-r--r--cocoa/BrowserViewController.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/cocoa/BrowserViewController.m b/cocoa/BrowserViewController.m
index 3d35f8f0a..0afe4b2f7 100644
--- a/cocoa/BrowserViewController.m
+++ b/cocoa/BrowserViewController.m
@@ -38,6 +38,8 @@
@synthesize status;
@synthesize isProcessing;
@synthesize favicon;
+@synthesize canGoBack;
+@synthesize canGoForward;
- (void) dealloc;
{
@@ -95,6 +97,7 @@
{
if (browser && history_back_available( browser->history )) {
history_back(browser, browser->history);
+ [self updateBackForward];
}
}
@@ -102,6 +105,7 @@
{
if (browser && history_forward_available( browser->history )) {
history_forward(browser, browser->history);
+ [self updateBackForward];
}
}
@@ -152,4 +156,15 @@ static inline bool compare_float( float a, float b )
}
+- (void) updateBackForward;
+{
+ [self setCanGoBack: browser != NULL && history_back_available( browser->history )];
+ [self setCanGoForward: browser != NULL && history_forward_available( browser->history )];
+}
+
+- (void) contentUpdated;
+{
+ [browserView setHistoryVisible: NO];
+}
+
@end