From: Raphaƫl Droz Date: Thu, 18 Apr 2013 15:07:01 +0000 (+0200) Subject: ui: makes potentially destructive operations safe to wrong key presses. X-Git-Tag: upstream/0.6.1~2^2~17 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=2367d83337f5b8cf1f4b910f10efd4eb30f6721d;p=pkg%2Fabook.git ui: makes potentially destructive operations safe to wrong key presses. When a deletion, a merge or a deduplication of entries is requested, accounts (translated) key binding other than [y|n] as a "no" instead of "yes" to avoid mistakes. --- diff --git a/ui.c b/ui.c index 4efcf85..e879885 100644 --- a/ui.c +++ b/ui.c @@ -653,7 +653,7 @@ ui_remove_items() if(list_is_empty()) return; - if(statusline_ask_boolean(_("Remove selected item(s)"), TRUE)) + if(statusline_ask_boolean(_("Remove selected item(s)"), FALSE)) remove_selected_items(); clear_statusline(); @@ -663,7 +663,7 @@ ui_remove_items() void ui_merge_items() { - if(statusline_ask_boolean(_("Merge selected items"), TRUE)) + if(statusline_ask_boolean(_("Merge selected items"), FALSE)) merge_selected_items(); clear_statusline(); @@ -672,7 +672,7 @@ ui_merge_items() void ui_remove_duplicates() { - if(statusline_ask_boolean(_("Remove duplicates"), TRUE)) + if(statusline_ask_boolean(_("Remove duplicates"), FALSE)) remove_duplicates(); clear_statusline();