diff options
author | Vincent Sanders <vince@kyllikki.org> | 2012-12-30 01:17:17 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2013-01-01 00:59:47 +0000 |
commit | 33934e12713f2ba8f5369a27f6abf725862f1a18 (patch) | |
tree | 2e44e88ae51bd73d7b7b2f2b40e63100c0451946 /desktop | |
parent | ea3f09a72433be165cc4ec09052b3d636e64ac0c (diff) | |
download | netsurf-33934e12713f2ba8f5369a27f6abf725862f1a18.tar.gz netsurf-33934e12713f2ba8f5369a27f6abf725862f1a18.tar.bz2 |
implement the GTK preferances dialog with signals
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/options.h | 3 | ||||
-rw-r--r-- | desktop/options_main.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/desktop/options.h b/desktop/options.h index 53c025c18..17ba64f6c 100644 --- a/desktop/options.h +++ b/desktop/options.h @@ -108,7 +108,8 @@ extern struct ns_options nsoptions; free(nsoptions.OPTION); \ } \ nsoptions.OPTION = VALUE; \ - if (*nsoptions.OPTION == 0) { \ + if ((nsoptions.OPTION != NULL) && \ + (*nsoptions.OPTION == 0)) { \ free(nsoptions.OPTION); \ nsoptions.OPTION = NULL; \ } \ diff --git a/desktop/options_main.h b/desktop/options_main.h index 9ec4888bc..7b9e7314b 100644 --- a/desktop/options_main.h +++ b/desktop/options_main.h @@ -66,6 +66,8 @@ char *accept_charset; \ /** Preferred maximum size of memory cache / bytes. */ \ int memory_cache_size; \ + /** Preferred expiry size of disc cache / bytes. */ \ + int disc_cache_size; \ /** Preferred expiry age of disc cache / days. */ \ int disc_cache_age; \ /** Whether to block advertisements */ \ @@ -220,6 +222,7 @@ .accept_language = NULL, \ .accept_charset = NULL, \ .memory_cache_size = 12 * 1024 * 1024, \ + .disc_cache_size = 1024 * 1024 * 1024, \ .disc_cache_age = 28, \ .block_ads = false, \ .do_not_track = false, \ @@ -315,6 +318,7 @@ { "accept_language", OPTION_STRING, &nsoptions.accept_language }, \ { "accept_charset", OPTION_STRING, &nsoptions.accept_charset }, \ { "memory_cache_size", OPTION_INTEGER, &nsoptions.memory_cache_size }, \ + { "disc_cache_size", OPTION_INTEGER, &nsoptions.disc_cache_size }, \ { "disc_cache_age", OPTION_INTEGER, &nsoptions.disc_cache_age }, \ { "block_advertisements", OPTION_BOOL, &nsoptions.block_ads }, \ { "do_not_track", OPTION_BOOL, &nsoptions.do_not_track }, \ |