diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-08-29 14:13:09 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-08-29 14:13:09 +0100 |
commit | 895954a1e1de4da43cbba6cbe431983d43dda8c6 (patch) | |
tree | 69193ea97ddecaee6a2a77c2ff49a20fab062a21 | |
parent | 7d0f0b08e2c7b6ca6d5f420ed34e37ed2f0934cb (diff) | |
download | netsurf-895954a1e1de4da43cbba6cbe431983d43dda8c6.tar.gz netsurf-895954a1e1de4da43cbba6cbe431983d43dda8c6.tar.bz2 |
Don't bother trying to keep old hotlist in sync -- the old one isn't saved when new one is used anyway.
-rw-r--r-- | desktop/hotlist_old.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/desktop/hotlist_old.c b/desktop/hotlist_old.c index d04704dd7..7be949941 100644 --- a/desktop/hotlist_old.c +++ b/desktop/hotlist_old.c @@ -403,6 +403,7 @@ void hotlist_old_add_folder(bool selected) /* Update new hotlist */ if (nsoption_bool(temp_treeview_test) != false) { hotlist_add_folder(NULL, false, 0); + return; } creating_node = true; @@ -460,13 +461,15 @@ void hotlist_old_add_entry(bool selected) if (nsurl_create("http://netsurf-browser.org/", &url) != NSERROR_OK) return; - node = tree_create_URL_node(hotlist_old_tree, parent, url, "Untitled", - hotlist_old_node_callback, NULL); /* Update new hotlist */ if (nsoption_bool(temp_treeview_test) != false) { hotlist_add_entry(url, "New untitled entry", false, 0); + nsurl_unref(url); + return; } + node = tree_create_URL_node(hotlist_old_tree, parent, url, "Untitled", + hotlist_old_node_callback, NULL); nsurl_unref(url); @@ -491,6 +494,13 @@ void hotlist_old_add_page(const char *url) if (nsurl_create(url, &nsurl) != NSERROR_OK) return; + /* Update new hotlist */ + if (nsoption_bool(temp_treeview_test) != false) { + hotlist_add_url(nsurl); + nsurl_unref(nsurl); + return; + } + data = urldb_get_url_data(nsurl); if (data == NULL) return; @@ -500,10 +510,6 @@ void hotlist_old_add_page(const char *url) hotlist_old_node_callback, NULL); tree_update_URL_node(hotlist_old_tree, node, nsurl, data); - /* Update new hotlist */ - if (nsoption_bool(temp_treeview_test) != false) - hotlist_add_url(nsurl); - nsurl_unref(nsurl); } @@ -529,6 +535,8 @@ void hotlist_old_add_page_xy(const char *url, int x, int y) /* Update new hotlist */ if (nsoption_bool(temp_treeview_test) != false) { hotlist_add_entry(nsurl, NULL, true, y); + nsurl_unref(nsurl); + return; } data = urldb_get_url_data(nsurl); |