diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-11-24 23:09:26 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-11-24 23:09:26 -0500 |
commit | 71934d4c16fa1925833ef6e65ccb33b358398bd0 (patch) | |
tree | d8d6db20acaf15473b7aa2607a46e56fb07d4085 /apps/onplay.c | |
parent | 3a22322ab77d38af3bea611f9dbb8f65b309d547 (diff) | |
download | rockbox-71934d4c16fa1925833ef6e65ccb33b358398bd0.tar.gz rockbox-71934d4c16fa1925833ef6e65ccb33b358398bd0.zip |
move confirm delete prompt to misc.c
Change-Id: Iadb1c7199caa5070f555eb4d329efb02e3193289
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index f8d13abf3f..7cc52fca46 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -63,6 +63,7 @@ #include "viewport.h" #include "pathfuncs.h" #include "shortcuts.h" +#include "misc.h" static int context; static const char *selected_file = NULL; @@ -898,15 +899,6 @@ static int confirm_overwrite(void) return gui_syncyesno_run(&message, NULL, NULL); } -static int confirm_delete(const char *file) -{ - const char *lines[] = { ID2P(LANG_REALLY_DELETE), file }; - const char *yes_lines[] = { ID2P(LANG_DELETING), file }; - const struct text_message message = { lines, 2 }; - const struct text_message yes_message = { yes_lines, 2 }; - return gui_syncyesno_run(&message, &yes_message, NULL); -} - static bool check_new_name(const char *basename) { /* at least prevent escapes out of the base directory from keyboard- @@ -1001,7 +993,7 @@ static int delete_file_dir(void) { const char *to_delete=selected_file; const int to_delete_attr=selected_file_attr; - if (confirm_delete(to_delete) != YESNO_YES) { + if (confirm_delete_yesno(to_delete) != YESNO_YES) { return 1; } |