summaryrefslogtreecommitdiff
path: root/cocoa/BrowserView.m
diff options
context:
space:
mode:
authorSven Weidauer <sven.weidauer@gmail.com>2011-01-25 09:53:39 +0000
committerSven Weidauer <sven.weidauer@gmail.com>2011-01-25 09:53:39 +0000
commit15e7b87caca8759c1d5b629955d688c05f4b7004 (patch)
tree717bed173d6edc7c96ed938ab6e731e843c285dd /cocoa/BrowserView.m
parent7ff51a93d5f622bd24ff359128a83c49e09f8bb8 (diff)
downloadnetsurf-15e7b87caca8759c1d5b629955d688c05f4b7004.tar.gz
netsurf-15e7b87caca8759c1d5b629955d688c05f4b7004.tar.bz2
Nicer button for local history, fading history view, more readable blue for active item
svn path=/trunk/netsurf/; revision=11481
Diffstat (limited to 'cocoa/BrowserView.m')
-rw-r--r--cocoa/BrowserView.m47
1 files changed, 19 insertions, 28 deletions
diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m
index ba0874c3a..ea5147558 100644
--- a/cocoa/BrowserView.m
+++ b/cocoa/BrowserView.m
@@ -28,10 +28,6 @@
#import "cocoa/font.h"
-@interface BrowserView () <HistoryViewDelegate>
-
-@end
-
@implementation BrowserView
@@ -182,7 +178,7 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
- (void) mouseUp: (NSEvent *)theEvent;
{
if (historyVisible) {
- [self toggleHistory];
+ [self setHistoryVisible: NO];
return;
}
@@ -339,29 +335,6 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
browser_window_key_press( browser, KEY_PASTE );
}
-- (void) toggleHistory;
-{
- if (!historyVisible) {
- if (nil == history) {
- history = [[HistoryView alloc] initWithBrowser: browser];
- [history setDelegate: self];
- }
- [self addSubview: history];
-
- historyVisible = YES;
- } else {
- [history removeFromSuperview];
- historyVisible = NO;
- }
-}
-
-
-- (void) historyViewDidSelectItem: (HistoryView *) history;
-{
- [history removeFromSuperview];
- historyVisible = NO;
-}
-
- (BOOL) acceptsFirstResponder;
{
return YES;
@@ -377,4 +350,22 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
[super adjustFrame];
}
+- (BOOL) isHistoryVisible;
+{
+ return historyVisible;
+}
+
+- (void) setHistoryVisible: (BOOL) newVisible;
+{
+ if (newVisible == historyVisible) return;
+ historyVisible = newVisible;
+
+ if (historyVisible) {
+ if (nil == history) history = [[HistoryView alloc] initWithBrowser: browser];
+ [history fadeIntoView: self];
+ } else {
+ [history fadeOut];
+ }
+}
+
@end