summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2005-01-04 22:12:02 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2005-01-04 22:12:02 +0000
commit8be9775d532d1a62f6fde629a73447bfd75561c6 (patch)
treebc7c197bfa4b2161f63f0b890a426b957feb157e /apps/onplay.c
parent521ecb81625a7cfa6f74432054c1fb2cf5c89a00 (diff)
downloadrockbox-8be9775d532d1a62f6fde629a73447bfd75561c6.tar.gz
rockbox-8be9775d532d1a62f6fde629a73447bfd75561c6.zip
no rename nor delete option on volumes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5533 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index c523d5f634..cc08a96a81 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -419,21 +419,26 @@ int onplay(char* file, int attr)
419 i++; 419 i++;
420 } 420 }
421 421
422 items[i].desc = ID2P(LANG_RENAME); 422#ifdef HAVE_MULTIVOLUME
423 items[i].function = rename_file; 423 if (!(attr & ATTR_VOLUME)) /* no rename+delete for volumes */
424 i++; 424#endif
425
426 if (!(attr & ATTR_DIRECTORY))
427 {
428 items[i].desc = ID2P(LANG_DELETE);
429 items[i].function = delete_file;
430 i++;
431 }
432 else
433 { 425 {
434 items[i].desc = ID2P(LANG_DELETE_DIR); 426 items[i].desc = ID2P(LANG_RENAME);
435 items[i].function = delete_dir; 427 items[i].function = rename_file;
436 i++; 428 i++;
429
430 if (!(attr & ATTR_DIRECTORY))
431 {
432 items[i].desc = ID2P(LANG_DELETE);
433 items[i].function = delete_file;
434 i++;
435 }
436 else
437 {
438 items[i].desc = ID2P(LANG_DELETE_DIR);
439 items[i].function = delete_dir;
440 i++;
441 }
437 } 442 }
438 443
439 if (!(attr & ATTR_DIRECTORY)) 444 if (!(attr & ATTR_DIRECTORY))