diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2006-07-28 16:31:23 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2006-07-28 16:31:23 +0000 |
commit | ba69b317428b640e59d3fafc74d7d7d0a985b5ff (patch) | |
tree | 70fa2ce8cd943be388b0bc7145f4ef621e39588e /gtk/gtk_gui.c | |
parent | 3cb5b48767d9b0de383056b82a47194f3434463c (diff) | |
download | netsurf-ba69b317428b640e59d3fafc74d7d7d0a985b5ff.tar.gz netsurf-ba69b317428b640e59d3fafc74d7d7d0a985b5ff.tar.bz2 |
Loading and saving of urldb on init/exit of nsgtk.
svn path=/trunk/netsurf/; revision=2801
Diffstat (limited to 'gtk/gtk_gui.c')
-rw-r--r-- | gtk/gtk_gui.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index 7309ed095..6a44c54db 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -29,6 +29,7 @@ #include "netsurf/gtk/gtk_gui.h" #include "netsurf/gtk/gtk_options.h" #include "netsurf/gtk/gtk_completion.h" +#include "netsurf/gtk/options.h" #include "netsurf/render/box.h" #include "netsurf/render/form.h" #include "netsurf/render/html.h" @@ -132,6 +133,12 @@ void gui_init(int argc, char** argv) if (!option_cookie_file || !option_cookie_jar) die("Failed initialising cookie options"); + if (!option_url_file) { + find_resource(buf, "URLs", "URLs"); + LOG(("Using '%s' as URL file", buf)); + option_url_file = strdup(buf); + } + find_resource(buf, "messages", "messages"); LOG(("Using '%s' as Messages file", buf)); messages_load(buf); @@ -145,7 +152,7 @@ void gui_init(int argc, char** argv) adblock_stylesheet_url = path_to_url(buf); LOG(("Using '%s' as AdBlock CSS URL", adblock_stylesheet_url)); - + urldb_load(option_url_file); urldb_load_cookies(option_cookie_file); } @@ -225,6 +232,7 @@ void gui_multitask(void) void gui_quit(void) { urldb_save_cookies(option_cookie_jar); + urldb_save(option_url_file); free(default_stylesheet_url); free(adblock_stylesheet_url); free(option_cookie_file); |