diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2006-04-09 23:21:13 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2006-04-09 23:21:13 +0000 |
commit | c09eb457df1962f5b014214874b2beffd69141a4 (patch) | |
tree | a7c30e8b57b1d8bdeb87127c8f1ba16e91bf3971 /desktop/options.c | |
parent | e5e1b982d55636b409b194cf0488ebafe9c6d519 (diff) | |
download | netsurf-c09eb457df1962f5b014214874b2beffd69141a4.tar.gz netsurf-c09eb457df1962f5b014214874b2beffd69141a4.tar.bz2 |
Unify information databases
svn path=/trunk/netsurf/; revision=2519
Diffstat (limited to 'desktop/options.c')
-rw-r--r-- | desktop/options.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/desktop/options.c b/desktop/options.c index 448bb78f7..58637f61e 100644 --- a/desktop/options.c +++ b/desktop/options.c @@ -21,6 +21,7 @@ #include <string.h> #include "libxml/HTMLparser.h" #include "libxml/HTMLtree.h" +#include "netsurf/content/urldb.h" #include "netsurf/css/css.h" #include "netsurf/desktop/options.h" #include "netsurf/desktop/tree.h" @@ -92,7 +93,7 @@ char *option_homepage_url = 0; /** Maximum simultaneous active fetchers */ int option_max_fetchers = 24; /** Maximum simultaneous active fetchers per host. - * (<=option_max_fetchers else it makes no sense + * (<=option_max_fetchers else it makes no sense */ int option_max_fetchers_per_host = 5; /** Maximum number of inactive fetchers cached. @@ -413,7 +414,7 @@ void options_load_tree_entry(xmlNode *li, struct node *directory) { char *title = 0; struct node *entry; xmlNode *n; - struct url_content *data; + const struct url_data *data; for (n = li->children; n; n = n->next) { /* The li must contain an "a" element */ @@ -430,12 +431,17 @@ void options_load_tree_entry(xmlNode *li, struct node *directory) { return; } - data = url_store_find(url); + data = urldb_get_url_data(url); + if (!data) + /* No entry in database, so add one */ + urldb_add_url(url); + + data = urldb_get_url_data(url); if (!data) return; if (!data->title) - data->title = strdup(title); - entry = tree_create_URL_node(directory, data, title); + urldb_set_url_title(url, title); + entry = tree_create_URL_node(directory, url, data, title); xmlFree(url); xmlFree(title); } |