diff options
author | James Bursa <james@netsurf-browser.org> | 2004-02-13 16:09:12 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-02-13 16:09:12 +0000 |
commit | 1319ff78c89fd0c34feea187ca3d67058875fbe6 (patch) | |
tree | b3a1bb74c14305e38991db53e9119c72084daa87 /debug | |
parent | add94ad0381bae4889dcd46620b8bfe4e4f443ce (diff) | |
download | netsurf-1319ff78c89fd0c34feea187ca3d67058875fbe6.tar.gz netsurf-1319ff78c89fd0c34feea187ca3d67058875fbe6.tar.bz2 |
[project @ 2004-02-13 16:09:12 by bursa]
Clean up and rewrite options code.
svn path=/import/netsurf/; revision=536
Diffstat (limited to 'debug')
-rw-r--r-- | debug/netsurfd.c | 7 | ||||
-rw-r--r-- | debug/optionsd.c | 28 |
2 files changed, 5 insertions, 30 deletions
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 <bursa@users.sourceforge.net> + * Copyright 2004 James Bursa <bursa@users.sourceforge.net> */ #include <stdbool.h> @@ -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 <bursa@users.sourceforge.net> - */ - -#include "netsurf/desktop/options.h" -#include <stdio.h> -#include <string.h> -#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"); -} - |