diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-07-21 06:40:01 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-07-21 06:40:01 +0000 |
commit | a7c37ea2d04c35628fc1ca9d353df637612303d0 (patch) | |
tree | 89df13b75ed199e4d284928cd016d0187706514e /apps/gui/yesno.c | |
parent | 2f620b8af336d65a7f48f131b1a78ecb0487de36 (diff) | |
download | rockbox-a7c37ea2d04c35628fc1ca9d353df637612303d0.tar.gz rockbox-a7c37ea2d04c35628fc1ca9d353df637612303d0.zip |
Pull yesno_pop out of the radio code as it is a nice simple resuasble yesno api worth reusing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30183 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/yesno.c')
-rw-r--r-- | apps/gui/yesno.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 6c87c8784c..5354aa526b 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -233,3 +233,17 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, | |||
233 | } | 233 | } |
234 | return(result); | 234 | return(result); |
235 | } | 235 | } |
236 | |||
237 | |||
238 | /* Function to manipulate all yesno dialogues. | ||
239 | This function needs the output text as an argument. */ | ||
240 | bool yesno_pop(const char* text) | ||
241 | { | ||
242 | int i; | ||
243 | const char *lines[]={text}; | ||
244 | const struct text_message message={lines, 1}; | ||
245 | bool ret = (gui_syncyesno_run(&message,NULL,NULL)== YESNO_YES); | ||
246 | FOR_NB_SCREENS(i) | ||
247 | screens[i].clear_viewport(); | ||
248 | return ret; | ||
249 | } | ||