From 06f80d731fce0a96fedc5dcce90fd864a4d7a409 Mon Sep 17 00:00:00 2001 From: François Revel Date: Tue, 26 Apr 2011 15:38:28 +0000 Subject: Accept urls as arguments to the OSX binary and open them in different windows. svn path=/trunk/netsurf/; revision=12240 --- cocoa/NetsurfApp.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cocoa/NetsurfApp.m') diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 9ab80fa1b..399ea11d1 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -179,7 +179,13 @@ int main( int argc, char **argv ) netsurf_init(&argc, &argv, options, messages); - [cocoa_prepare_app() run]; + NSApplication *app = cocoa_prepare_app(); + + for (int i = 1; i < argc; i++) { + browser_window_create( argv[i], NULL, NULL, true, false ); + } + + [app run]; netsurf_exit(); -- cgit v1.2.3