Taking homepage from user defaults

svn path=/trunk/netsurf/; revision=11348
This commit is contained in:
Sven Weidauer 2011-01-17 15:00:12 +00:00
parent 76f2b2af98
commit d2aa0bcea9

View File

@ -29,11 +29,21 @@
@implementation NetSurfAppDelegate
NSString * const kHomepageURL = @"HomepageURL";
@synthesize historyWindow;
+ (void) initialize;
{
[[NSUserDefaults standardUserDefaults] registerDefaults: [NSDictionary dictionaryWithObjectsAndKeys:
@"http://netsurf-browser.org/welcome/", kHomepageURL,
nil]];
}
- (void) newDocument: (id) sender;
{
browser_window_create( "http://netsurf-browser.org/", NULL, NULL, true, false );
NSString *homepageURL = [[NSUserDefaults standardUserDefaults] objectForKey: kHomepageURL];
browser_window_create( [homepageURL UTF8String], NULL, NULL, true, false );
}
- (void) openDocument: (id) sender;