summaryrefslogtreecommitdiff
path: root/cocoa/BookmarksController.m
diff options
context:
space:
mode:
authorSven Weidauer <sven.weidauer@gmail.com>2011-02-01 14:52:20 +0000
committerSven Weidauer <sven.weidauer@gmail.com>2011-02-01 14:52:20 +0000
commitab87a4b960bf70ac7def486de5d2c51a4c6af7f1 (patch)
tree34d6773532bcdb139a52a61c14718b9788a61ac8 /cocoa/BookmarksController.m
parent81e295d8c94c3c2d7c6bcc3d71ae114b4d984ce6 (diff)
downloadnetsurf-ab87a4b960bf70ac7def486de5d2c51a4c6af7f1.tar.gz
netsurf-ab87a4b960bf70ac7def486de5d2c51a4c6af7f1.tar.bz2
Bookmarks window. No editing yet.
svn path=/trunk/netsurf/; revision=11581
Diffstat (limited to 'cocoa/BookmarksController.m')
-rw-r--r--cocoa/BookmarksController.m17
1 files changed, 11 insertions, 6 deletions
diff --git a/cocoa/BookmarksController.m b/cocoa/BookmarksController.m
index e78d76529..9ec6818d7 100644
--- a/cocoa/BookmarksController.m
+++ b/cocoa/BookmarksController.m
@@ -18,6 +18,7 @@
#import "cocoa/BookmarksController.h"
#import "cocoa/Tree.h"
+#import "cocoa/TreeView.h"
#import "cocoa/NetsurfApp.h"
#import "cocoa/BrowserViewController.h"
#import "cocoa/gui.h"
@@ -29,6 +30,7 @@
@implementation BookmarksController
@synthesize defaultMenu;
+@synthesize view;
static const char *cocoa_hotlist_path( void )
{
@@ -38,7 +40,7 @@ static const char *cocoa_hotlist_path( void )
- init;
{
- if ((self = [super init]) == nil) return nil;
+ if ((self = [super initWithWindowNibName: @"BookmarksWindow"]) == nil) return nil;
tree = [[Tree alloc] initWithFlags: hotlist_get_tree_flags()];
hotlist_initialise( [tree tree], cocoa_hotlist_path(), "" );
@@ -49,9 +51,11 @@ static const char *cocoa_hotlist_path( void )
- (void) dealloc;
{
+ [self setView: nil];
NSFreeMapTable( nodeForMenu );
hotlist_cleanup( cocoa_hotlist_path() );
[tree release];
+
[super dealloc];
}
@@ -112,11 +116,6 @@ static const char *cocoa_hotlist_path( void )
}
}
-- (IBAction) showBookmarksWindow: (id) sender;
-{
- NSLog( @"TODO: show bookmarks window" );
-}
-
- (IBAction) addBookmark: (id) sender;
{
NSLog( @"TODO: add bookmark" );
@@ -133,6 +132,12 @@ static const char *cocoa_hotlist_path( void )
return YES;
}
+- (void) windowDidLoad;
+{
+ hotlist_expand_all( );
+ [view setTree: tree];
+}
+
+ (void) initialize;
{