From 1319ff78c89fd0c34feea187ca3d67058875fbe6 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 13 Feb 2004 16:09:12 +0000 Subject: [project @ 2004-02-13 16:09:12 by bursa] Clean up and rewrite options code. svn path=/import/netsurf/; revision=536 --- debug/netsurfd.c | 7 +++++-- debug/optionsd.c | 28 ---------------------------- 2 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 debug/optionsd.c (limited to 'debug') diff --git a/debug/netsurfd.c b/debug/netsurfd.c index f26521654..d0e62ebda 100644 --- a/debug/netsurfd.c +++ b/debug/netsurfd.c @@ -2,7 +2,7 @@ * This file is part of NetSurf, http://netsurf.sourceforge.net/ * Licensed under the GNU General Public License, * http://www.opensource.org/licenses/gpl-license - * Copyright 2003 James Bursa + * Copyright 2004 James Bursa */ #include @@ -12,6 +12,7 @@ #include "netsurf/content/cache.h" #include "netsurf/content/content.h" #include "netsurf/content/fetchcache.h" +#include "netsurf/desktop/options.h" #include "netsurf/utils/log.h" #include "netsurf/utils/utils.h" @@ -41,6 +42,7 @@ int main(int argc, char *argv[]) fetch_init(); cache_init(); fetchcache_init(); + options_read("options"); while (1) { puts("=== URL:"); @@ -48,7 +50,7 @@ int main(int argc, char *argv[]) break; url[strlen(url) - 1] = 0; destroyed = 0; - c = fetchcache(url, 0, callback, 0, 0, 100, 1000, false + c = fetchcache(url, 0, callback, 0, 0, 1000, 1000, false #ifdef WITH_POST , 0, 0 #endif @@ -70,6 +72,7 @@ int main(int argc, char *argv[]) content_remove_user(c, callback, 0, 0); } + options_write("options"); cache_quit(); fetch_quit(); diff --git a/debug/optionsd.c b/debug/optionsd.c deleted file mode 100644 index 2490c1f2f..000000000 --- a/debug/optionsd.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of NetSurf, http://netsurf.sourceforge.net/ - * Licensed under the GNU General Public License, - * http://www.opensource.org/licenses/gpl-license - * Copyright 2003 James Bursa - */ - -#include "netsurf/desktop/options.h" -#include -#include -#include "netsurf/utils/log.h" -#include "netsurf/utils/utils.h" - -struct options OPTIONS; - -void options_init(struct options* opt) -{ - opt->http = 0; - opt->http_proxy = strdup(""); - opt->http_port = 8080; - opt->use_mouse_gestures = 0; - opt->allow_text_selection = 1; - opt->use_riscos_elements = 1; - opt->show_toolbar = 1; - opt->show_print_preview = 0; - opt->theme = strdup("Default"); -} - -- cgit v1.2.3