diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-01-04 22:12:02 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-01-04 22:12:02 +0000 |
commit | 8be9775d532d1a62f6fde629a73447bfd75561c6 (patch) | |
tree | bc7c197bfa4b2161f63f0b890a426b957feb157e | |
parent | 521ecb81625a7cfa6f74432054c1fb2cf5c89a00 (diff) | |
download | rockbox-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
-rw-r--r-- | apps/onplay.c | 31 |
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) i++; } - items[i].desc = ID2P(LANG_RENAME); - items[i].function = rename_file; - i++; - - if (!(attr & ATTR_DIRECTORY)) - { - items[i].desc = ID2P(LANG_DELETE); - items[i].function = delete_file; - i++; - } - else +#ifdef HAVE_MULTIVOLUME + if (!(attr & ATTR_VOLUME)) /* no rename+delete for volumes */ +#endif { - items[i].desc = ID2P(LANG_DELETE_DIR); - items[i].function = delete_dir; + items[i].desc = ID2P(LANG_RENAME); + items[i].function = rename_file; i++; + + if (!(attr & ATTR_DIRECTORY)) + { + items[i].desc = ID2P(LANG_DELETE); + items[i].function = delete_file; + i++; + } + else + { + items[i].desc = ID2P(LANG_DELETE_DIR); + items[i].function = delete_dir; + i++; + } } if (!(attr & ATTR_DIRECTORY)) |