summaryrefslogtreecommitdiff
path: root/apps/gui/yesno.h
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2023-09-24 22:00:23 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2023-10-01 11:51:38 -0400
commit1c47722226870023bf422d451527d86774900e1b (patch)
treec87e4c8764be8432af797f54629ddafbaf1ec402 /apps/gui/yesno.h
parent7ccbd705f43553ff358d6713c8d6ac7cc9e3c343 (diff)
downloadrockbox-1c47722226870023bf422d451527d86774900e1b.tar.gz
rockbox-1c47722226870023bf422d451527d86774900e1b.zip
[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
Diffstat (limited to 'apps/gui/yesno.h')
-rw-r--r--apps/gui/yesno.h11
1 files changed, 9 insertions, 2 deletions
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
27{ 27{
28 YESNO_YES, 28 YESNO_YES,
29 YESNO_NO, 29 YESNO_NO,
30 YESNO_USB 30 YESNO_USB,
31 YESNO_TMO
31}; 32};
32 33
33struct text_message 34struct text_message
@@ -48,7 +49,13 @@ extern enum yesno_res gui_syncyesno_run(
48 const struct text_message * main_message, 49 const struct text_message * main_message,
49 const struct text_message * yes_message, 50 const struct text_message * yes_message,
50 const struct text_message * no_message); 51 const struct text_message * no_message);
51 52
53extern enum yesno_res gui_syncyesno_run_w_tmo(
54 int ticks, enum yesno_res tmo_default_res,
55 const struct text_message * main_message,
56 const struct text_message * yes_message,
57 const struct text_message * no_message);
58
52bool yesno_pop(const char* text); 59bool yesno_pop(const char* text);
53 60
54#endif /* _GUI_YESNO_H_ */ 61#endif /* _GUI_YESNO_H_ */