Add confirm_hotlist_remove option to allow users to turn URL removal query off.

This commit is contained in:
Steve Fryatt 2013-12-31 16:57:47 +00:00
parent 6041089169
commit ea28b07cae
2 changed files with 14 additions and 4 deletions

View File

@ -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();
}
}

View File

@ -53,6 +53,7 @@ NSOPTION_BOOL(no_plugins, false)
NSOPTION_BOOL(block_popups, false)
NSOPTION_BOOL(strip_extensions, false)
NSOPTION_BOOL(confirm_overwrite, true)
NSOPTION_BOOL(confirm_hotlist_remove, true)
NSOPTION_STRING(url_path, "NetSurf:URL")
NSOPTION_STRING(url_save, CHOICES_PREFIX "URL")
NSOPTION_STRING(hotlist_path, "NetSurf:Hotlist")