diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-08-15 21:10:36 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-08-16 08:25:25 +0100 |
commit | 82f5cd33a0a2a9bc1507551454a5fc2011f738ef (patch) | |
tree | 70c16291d4c5843eea5dd83a94140c9bccb1226f /desktop/hotlist.c | |
parent | 952ab7b6e442d6e7a0a880f01b799fb39a5b92c7 (diff) | |
download | netsurf-82f5cd33a0a2a9bc1507551454a5fc2011f738ef.tar.gz netsurf-82f5cd33a0a2a9bc1507551454a5fc2011f738ef.tar.bz2 |
Implement simplisitic hotlist_add function. Need to improve where new entries are placed. (See TODO comment.)
Diffstat (limited to 'desktop/hotlist.c')
-rw-r--r-- | desktop/hotlist.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/desktop/hotlist.c b/desktop/hotlist.c index d137a5e57..5481a38c2 100644 --- a/desktop/hotlist.c +++ b/desktop/hotlist.c @@ -820,20 +820,17 @@ nserror hotlist_fini(const char *path) /* Exported interface, documented in hotlist.h */ nserror hotlist_add(nsurl *url) { - const struct url_data *data; + treeview_node *entry; + nserror err; /* If we don't have a hotlist at the moment, just return OK */ if (hl_ctx.tree == NULL) return NSERROR_OK; - data = urldb_get_url_data(url); - if (data == NULL) { - LOG(("Can't add URL to hotlist that's not present in urldb.")); - return NSERROR_BAD_PARAMETER; - } - - /* TODO */ - //hotlist_add_entry(url, data); + /* TODO: Don't just dump it at the top of the root node. + * Make an "Unsorted" folder for new additions. */ + err = hotlist_add_entry_internal(url, NULL, NULL, NULL, + TREE_REL_FIRST_CHILD, &entry); return NSERROR_OK; } |