summaryrefslogtreecommitdiff
path: root/cocoa/HistoryView.m
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/HistoryView.m')
-rw-r--r--cocoa/HistoryView.m17
1 files changed, 11 insertions, 6 deletions
diff --git a/cocoa/HistoryView.m b/cocoa/HistoryView.m
index 49982b393..bf38b7716 100644
--- a/cocoa/HistoryView.m
+++ b/cocoa/HistoryView.m
@@ -20,6 +20,8 @@
#import "cocoa/font.h"
#import "cocoa/coordinates.h"
#import "cocoa/plotter.h"
+#import "cocoa/LocalHistoryController.h"
+#import "cocoa/BrowserView.h"
#import "desktop/browser.h"
#import "desktop/history_core.h"
@@ -27,11 +29,12 @@
@implementation HistoryView
-@synthesize browser;
+@synthesize browser = browserView;
-- (void) setBrowser: (struct browser_window *) bw;
+- (void) setBrowser: (BrowserView *) bw;
{
- browser = bw;
+ browserView = bw;
+ browser = [bw browser];
[self updateHistory];
}
@@ -63,9 +66,11 @@
{
const NSPoint location = [self convertPoint: [theEvent locationInWindow] fromView: nil];
const bool newWindow = [theEvent modifierFlags] & NSCommandKeyMask;
- history_click( browser, browser->history,
- cocoa_pt_to_px( location.x ), cocoa_pt_to_px( location.y ),
- newWindow );
+ if (history_click( browser, browser->history,
+ cocoa_pt_to_px( location.x ), cocoa_pt_to_px( location.y ),
+ newWindow )) {
+ [browserView setHistoryVisible: NO];
+ }
}
- (BOOL) isFlipped;