From b59616c9ab85b0f58c0318f62e39f197932a712b Mon Sep 17 00:00:00 2001 From: Andrew Timmins Date: Mon, 26 Jul 2004 20:13:45 +0000 Subject: [project @ 2004-07-26 20:13:45 by atimmins] Updated to support new config options (homepage, open on startup). Bug fixes with new config pane window (sticky selected radio icon bug!). Also includes up-to-date French templates. svn path=/import/netsurf/; revision=1150 --- desktop/netsurf.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'desktop/netsurf.c') diff --git a/desktop/netsurf.c b/desktop/netsurf.c index 507840454..b38f198a1 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -4,6 +4,7 @@ * http://www.opensource.org/licenses/gpl-license * Copyright 2003 Phil Mellor * Copyright 2004 James Bursa + * Copyright 2004 Andrew Timmins */ #include @@ -13,7 +14,11 @@ #include "netsurf/utils/config.h" #include "netsurf/content/fetch.h" #include "netsurf/content/fetchcache.h" -#include "netsurf/desktop/options.h" +#ifdef riscos + #include "netsurf/riscos/options.h" +#else + #include "netsurf/desktop/options.h" +#endif #include "netsurf/desktop/netsurf.h" #include "netsurf/desktop/browser.h" #include "netsurf/desktop/gui.h" @@ -38,12 +43,27 @@ static void lib_init(void); int main(int argc, char** argv) { + char url[80]; + int length; + netsurf_init(argc, argv); #ifdef WITH_KIOSK_BROWSING browser_window_create("file://Docs/Intro_En", NULL); #endif + if (option_open_browser_at_startup == true){ + if (!(option_homepage_url == NULL)){ + browser_window_create(option_homepage_url, NULL); + } + else { + if ((length = snprintf(url, sizeof(url), + "file://Docs/intro_%s", + option_language)) >= 0 && length < (int)sizeof(url)) + browser_window_create(url, NULL); + } + } + while (!netsurf_quit) netsurf_poll(); -- cgit v1.2.3