summaryrefslogtreecommitdiff
path: root/riscos/hotlist.c
diff options
context:
space:
mode:
authorSteve Fryatt <stevef@netsurf-browser.org>2013-12-31 16:57:47 +0000
committerSteve Fryatt <stevef@netsurf-browser.org>2013-12-31 16:57:47 +0000
commitea28b07cae4d0d40850be1417bd00e555e6168fb (patch)
tree0f0c08e0fa92d1214fdf31a47fee0b70f736c44e /riscos/hotlist.c
parent604108916923146c888e6659bd5df24fab460e41 (diff)
downloadnetsurf-ea28b07cae4d0d40850be1417bd00e555e6168fb.tar.gz
netsurf-ea28b07cae4d0d40850be1417bd00e555e6168fb.tar.bz2
Add confirm_hotlist_remove option to allow users to turn URL removal query off.
Diffstat (limited to 'riscos/hotlist.c')
-rw-r--r--riscos/hotlist.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index b29ba7e19..f47d05e9c 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -629,12 +629,21 @@ void ro_gui_hotlist_remove_page(nsurl *url)
hotlist_delete_url = NULL;
}
- hotlist_query = query_user("RemoveHotlist", NULL, &remove_funcs, NULL,
- messages_get("Remove"), messages_get("DontRemove"));
+ /* Check with the user before removing the URL, unless they don't
+ * want us to be careful in which case just do it.
+ */
- hotlist_delete_url = nsurl_ref(url);
+ if (nsoption_bool(confirm_hotlist_remove)) {
+ hotlist_query = query_user("RemoveHotlist", NULL,
+ &remove_funcs, NULL,
+ messages_get("Remove"),
+ messages_get("DontRemove"));
- // hotlist_remove_url(url);
+ hotlist_delete_url = nsurl_ref(url);
+ } else {
+ hotlist_remove_url(url);
+ ro_toolbar_update_all_hotlists();
+ }
}