From 1c47722226870023bf422d451527d86774900e1b Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 24 Sep 2023 22:00:23 -0400 Subject: [Feature] add a prompt to database commit on start-up adds a new function: gui_syncyesno_run_w_tmo(ticks, tmo_default_res, main_msg,yes_msg, no_msg) when a database needs committed on start-up a yes no prompt will appear if not answered within 5 seconds it defaults to Yes if instead you choose No next start-up you will be asked again you could rebuild the db still and waste time but it wouldn't hurt anything so I don't think that path needs blocked Change-Id: I58411f6e6bfebb6f142d99f33a1e8885ae7785c1 --- apps/gui/yesno.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apps/gui/yesno.h') diff --git a/apps/gui/yesno.h b/apps/gui/yesno.h index 61bcf8d3c0..5f67733d79 100644 --- a/apps/gui/yesno.h +++ b/apps/gui/yesno.h @@ -27,7 +27,8 @@ enum yesno_res { YESNO_YES, YESNO_NO, - YESNO_USB + YESNO_USB, + YESNO_TMO }; struct text_message @@ -48,7 +49,13 @@ extern enum yesno_res gui_syncyesno_run( const struct text_message * main_message, const struct text_message * yes_message, const struct text_message * no_message); - + +extern enum yesno_res gui_syncyesno_run_w_tmo( + int ticks, enum yesno_res tmo_default_res, + const struct text_message * main_message, + const struct text_message * yes_message, + const struct text_message * no_message); + bool yesno_pop(const char* text); #endif /* _GUI_YESNO_H_ */ -- cgit v1.2.3