From 13d6f8703bacfb8543c9d22c01db60e083650cad Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Sun, 13 May 2012 14:09:21 +0200 Subject: Factorize boolean user prompting. Introduce a new `status_ask_bool()` function, and use it where applicable. This greatly reduces code duplication, and will allow handling special events (resize, user escape) much more uniformely. Signed-off-by: Baptiste Jonglez Signed-off-by: Lukas Fleischer --- src/apoint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/apoint.c') diff --git a/src/apoint.c b/src/apoint.c index 60a7c19..9bcde1b 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -276,8 +276,7 @@ apoint_delete (unsigned *nb_events, unsigned *nb_apoints) if (conf.confirm_delete) { - status_mesg_yesno (del_app_str); - if (wgetch (win[STA].p) != 'y') + if (status_ask_bool (del_app_str) != 1) { wins_erase_status_bar (); return; -- cgit v1.2.3-54-g00ecf