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 <baptiste--git@jonglez.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
committed by
Lukas Fleischer
parent
7d4ef08345
commit
13d6f8703b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user