summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c1
-rw-r--r--desktop/netsurf.c22
2 files changed, 22 insertions, 1 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index a3480a1d1..fabd7ab4e 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -4,6 +4,7 @@
* http://www.opensource.org/licenses/gpl-license
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
*/
/** \file
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 <monkeyson@users.sourceforge.net>
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
*/
#include <locale.h>
@@ -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:/<NetSurf$Dir>/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:/<NetSurf$Dir>/Docs/intro_%s",
+ option_language)) >= 0 && length < (int)sizeof(url))
+ browser_window_create(url, NULL);
+ }
+ }
+
while (!netsurf_quit)
netsurf_poll();