forked from len0rd/rockbox
No VBRfix for non-mp3 files. Fixed delete confirmation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3496 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f8979dae58
commit
276b9e30be
1 changed files with 7 additions and 4 deletions
|
|
@ -32,6 +32,7 @@
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
#include "tree.h"
|
||||||
|
|
||||||
static char* selected_file = NULL;
|
static char* selected_file = NULL;
|
||||||
static bool reload_dir = false;
|
static bool reload_dir = false;
|
||||||
|
|
@ -49,17 +50,17 @@ static bool delete_file(void)
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0,0,str(LANG_REALLY_DELETE));
|
lcd_puts(0,0,str(LANG_REALLY_DELETE));
|
||||||
lcd_puts_scroll(0,1,selected_file);
|
lcd_puts_scroll(0,1,selected_file);
|
||||||
|
lcd_update();
|
||||||
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
int btn = button_get(true);
|
int btn = button_get(true);
|
||||||
switch (btn) {
|
switch (btn) {
|
||||||
case BUTTON_PLAY:
|
case BUTTON_PLAY:
|
||||||
case BUTTON_PLAY | BUTTON_REL:
|
|
||||||
if (!remove(selected_file)) {
|
if (!remove(selected_file)) {
|
||||||
reload_dir = true;
|
reload_dir = true;
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts_scroll(0,0,selected_file);
|
lcd_puts(0,0,str(LANG_DELETED));
|
||||||
lcd_puts(0,1,str(LANG_DELETED));
|
lcd_puts_scroll(0,1,selected_file);
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
exit = true;
|
exit = true;
|
||||||
|
|
@ -151,6 +152,8 @@ int onplay(char* file, int attr)
|
||||||
menu[i++] = (struct menu_items) { str(LANG_DELETE), delete_file };
|
menu[i++] = (struct menu_items) { str(LANG_DELETE), delete_file };
|
||||||
|
|
||||||
menu[i++] = (struct menu_items) { str(LANG_RENAME), rename_file };
|
menu[i++] = (struct menu_items) { str(LANG_RENAME), rename_file };
|
||||||
|
|
||||||
|
if (attr & TREE_ATTR_MPA)
|
||||||
menu[i++] = (struct menu_items) { "VBRfix", vbr_fix };
|
menu[i++] = (struct menu_items) { "VBRfix", vbr_fix };
|
||||||
|
|
||||||
/* DIY menu handling, since we want to exit after selection */
|
/* DIY menu handling, since we want to exit after selection */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue