From b112dec78d5e8289ded3f61db96e495690ae96b5 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 14 Feb 2013 18:21:11 +0000 Subject: change browser_window_create and refactor all callsites --- cocoa/NetsurfApp.m | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'cocoa/NetsurfApp.m') diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 4c2dfc185..b9cf4b999 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -175,6 +175,9 @@ void gui_options_init_defaults(void) int main( int argc, char **argv ) { + nsurl *url; + nserror error; + cocoa_autorelease(); const char * const messages = [[[NSBundle mainBundle] pathForResource: @"Messages" ofType: @""] UTF8String]; @@ -193,7 +196,20 @@ int main( int argc, char **argv ) /* skip -psn_* and other possible options */ if (argv[i][0] == '-') continue; - browser_window_create( argv[i], NULL, NULL, true, false ); + + error = nsurl_create(argv[i], &url); + if (error == NSERROR_OK) { + error = browser_window_create(BROWSER_WINDOW_GO_FLAG_VERIFIABLE | + BROWSER_WINDOW_GO_FLAG_HISTORY, + url, + NULL, + NULL, + NULL); + nsurl_unref(url); + } + if (error != NSERROR_OK) { + warn_user(messages_get_errorcode(error), 0); + } } [app run]; -- cgit v1.2.3